sql 中 产品同时不包含带有以下字母的 a,b,c,d,e,f...如何写?

解决方案 »

  1.   

    select * from table where patindex('%[a,b,c,d,e,f]%',列名) = 0
      

  2.   

    select * from t where 字段 not like '%[a-z]%'
      

  3.   

    还是不行 ,我说的字母只是一个例子,比如我们的产品中有  SM/W/JC ,TY/JY, LK/FK  SA/YU....  我想过滤掉其中的一部分产品。 如想过滤掉含有 SM,JT,FK 的 我用上面的试了一下不行.
      

  4.   

    select * from 表名 where patindex('%[SM]%',列名) = 0 AND patindex('%JT]%',列名) = 0 and patindex('%[FK]%',列名) = 0
      

  5.   

    select * from t where 字段 not like '%SM%' and 字段 not like '%FK%' and 字段 not like '%JT%'