请问where [test] like '%张%' 
   or [test] like '%王%'
   or [test] like '%李%'
   or [test] like '%赵%'
   or [test] like '%刘%' 可否用一句话就表达完整意思,

解决方案 »

  1.   

    select * from table1 where [test] like '%[张王李赵刘]%'
      

  2.   

    [ ]  与特定范围(例如,[a-f])或特定集(例如,[abcdef])中的任意单字符匹配。
     
    [^]  与特定范围(例如,[^a-f])或特定集(例如,[^abcdef])之外的任意单字符匹配。
      

  3.   

    select * from table1 where [test] like '%[张王李赵刘]%'非常好!!
    刚才我有一些不准确,现在重新解释一遍where [test] like '%张三%'  
      or [test] like '%王五%'
       or [test] like '%李四%'
       or [test] like '%赵六%'
       or [test] like '%刘正%'
      

  4.   

    如果是名字的>=两个字 like 情况下用in建议用in
    where test in('张三','王五','李四','赵六')
      

  5.   

    where charindex('张三王五李四赵六',test)>0