declare @id as varchar(50) set @id='123456,' select SUBSTRING(@id,Len(@id)) 返回结果 123456 ,最后的逗号去掉了 ---- 来自jb51.cc