sqlserver 格式化数目字为定长字符串,位数不足加前导0

sqlserver 格式化数字为定长字符串,位数不足加前导0--格式化成3位的。selectright(1000+5,3)--或者select r

sqlserver 格式化数字为定长字符串,位数不足加前导0
--格式化成3位的。
select   right(1000+5,3)

--或者
select right(cast(power(10,3) as varchar)+5,3)