首页 > 代码库 > CAST格式化列数据前加0

CAST格式化列数据前加0

update TableNameset ConsultantID=right(cast(1000000000+CONVERT(int,ConsultantID) as varchar(10)),9)