insert @t select
'000000123'
union all select
'000145'
union all select
'01'
union all select
'00000048'
union all select
'0001556'
union all select --加条不以0开头的
'124'
select stuff(col,1,PATINDEX ( '%[^0]%' , col )-1 ,'') as col
from @t
--结果
col
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
123
145
1
48
1556
124