select right(‘00000‘+ltrim(colname),5) from table
现在有一列是int的,把它变成5位的字符串,左边不够的补0
原文:http://www.cnblogs.com/shenyixin/p/4096594.html