select * from 表 
where 
charindex(表.字段,'青菜|萝卜|猪肉')>0 
or charindex('青菜|萝卜|猪肉',表.字段) > 0

解决方案 »

  1.   

    --测试数据
    create table #t (name varchar (80))insert into #t  
    select '青菜|萝卜|猪肉' union all
    select '萝卜' union all
    select '青菜' union all
    select '萝卜|猪肉'  union all
    select '白菜|猪肉'--测试select
    select * from #t 
    where 
    charindex(#t.name,'青菜|萝卜|猪肉')>0 
    or charindex('青菜|萝卜|猪肉',#t.name) > 0 --删表
    drop table #t