sql 数字转换为字符串补0

select right('00000000000'+convert(varchar(5),123),5)

select right('00000000000'+cast(123   as   varchar(6)),6)

posted @ 2019-08-16 11:00  Aaronguo  阅读(4975)  评论(0)    收藏  举报