日期:2014-05-18 浏览次数:20342 次
select ('0000'+ltrim(id),5)
------解决方案--------------------
select right(100000+id,5) from tb
------解决方案--------------------
select IDENTITY(int,1,20) as id into b_test select right('0000'+LTRIM(id),5) as id from b_test /* id 00001 */