create table table1(c1 int ,c2 varchar(100))insert into table1 select 998, '100101,120100,100133'union select 999, '101101,130100,152133'
union select 999, '101101,130100,100133'
select *
from table1
where substring(c2,1,3)='100' or charindex(',100',c2)<>0结果c1 c2
----------- ----------------------------------------------------------------------------------------------------
998 100101,120100,100133
999 101101,130100,100133(所影响的行数为 2 行)
union select 999, '101101,130100,100133'
select *
from table1
where substring(c2,1,3)='100' or charindex(',100',c2)<>0结果c1 c2
----------- ----------------------------------------------------------------------------------------------------
998 100101,120100,100133
999 101101,130100,100133(所影响的行数为 2 行)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货