update TableName set ConsultantID=right(cast(‘1000000000‘+CONVERT(int,ConsultantID) as varchar(10)),9)
CAST格式化列数据前加0,布布扣,bubuko.com
CAST格式化列数据前加0
原文:http://www.cnblogs.com/monkeyfather/p/3867879.html