34,588
社区成员
发帖
与我相关
我的任务
分享
select *
from table_1
where index(a,'中国') > 0 or index(a,'英国') > 0;
declare @tb table (id int,a varchar(20))
insert into @tb select 1,'中国,美国,日本'
insert into @tb select 1,'加拿大,中国'
insert into @tb select 1,'美国,英国'
insert into @tb select 1,'美国'
select * from @tb where a like '%[中,英][国]%'
select * from table1 where a like '%中国%' or a like '%英国%'
select *
from table1
where charindex(','+'中国,英国'+',',','+A+',') > 0 or charindex(','+'英国,中国'+',',','+A+',') > 0