日期:2014-05-18 浏览次数:20446 次
declare @T table (ID int,comment varchar(6)) insert into @T select 1,'12*13' union all select 2,'124*3' union all select 3,'ASD*4R' union all select 4,'23D' select left(comment+'*',charindex('*',comment+'*')-1) from @T /* 12 124 ASD 23D */