现在有一列是int的,把它变成5位的字符串,左边不够的补0[转载]

select right('00000'+ltrim(colname),5)  from table

 

posted @ 2017-04-10 13:14  pilink  阅读(222)  评论(0)    收藏  举报