📜  tsql pad left - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:12.799000             🧑  作者: Mango

代码示例1
declare @T table(id int)
insert into @T values
(1),
(2),
(12),
(123),
(1234)

select right('0000'+convert(varchar(4), id), 4)
from @T