Answers for "tsql pad left"

SQL
0

tsql pad left

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

select right('0000'+convert(varchar(4), id), 4)
from @T
Posted by: Guest on July-23-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language