charindex('关键字',字段)=0
或者上面的加not

解决方案 »

  1.   

    not like '%关键字%'
      

  2.   

    select * from 表 where 字段 not like '%关键字%'
      

  3.   

    --数据装载
    Create Table #T(Column1 varchar(20))
    insert #T select '040011'
    union all select '010021'
    union all select '024综合'
    union all select '021不知道'
    union all select '031不'
    union all select '不3'
    union all select '知道'--1:求包含数字,且长度为6的集合(包含了中文)
    select * from #T  where Column1 not like '%[0-9]%' --select * from #T  where Column1  like '%[0-9]%'  --and len(Column1)=6
    drop table #T
      

  4.   

    to zlp321002(飘过)
    like '%^关键字%' 测试不行
      

  5.   

    like '%^关键字%' 测试不行 对.不通过