27,580
社区成员
发帖
与我相关
我的任务
分享
select * from table where 城市 not like '%广东%' and 城市 not like '%上海%' and 城市 not like '%北京%'
select *
from table t
inner join
(
select '%广东%' v union all
select '%上海%' union all
select '%北京%'
)vv
on t.城市 not like vv.v
select * from table
where 城市 not like in ('%广东%','%上海%','%北京%')
--try this
select * from table
where CHARINDEX('广东',城市)<1
AND CHARINDEX('上海',城市)<1
AND CHARINDEX('北京',城市)<1