select * from yourtable where name like '%,yourvalue,%'
union
select * from yourtable where name like 'yourvalue,%'
union
select * from yourtable where name like '%,yourvalue'

解决方案 »

  1.   

    select * from yourtable where name like '%,' & yourvalue & ',%'
    union
    select * from yourtable where name like yourvalue & ',%'
    union
    select * from yourtable where name like '%,' & yourvalue
      

  2.   

    我可能没说明白,name字段里的值用","分割,也不知道有多长
      

  3.   

    yourvalue是你要查的值
    name是你要查的字段
    只要你的字段里有变量yourvalue的值,就可查到了
      

  4.   

    "select * from tablename where "," & name & "," like "'%," & 数字 & ",%'"
      

  5.   

    name="a,b,ac,dc",myvalue="c"
    这条记录滿足要求,可不是我想要的
      

  6.   

    我明白你的意思了是不是要这个样子select * from tableName
    where
      name not in('a','b','ac','dc')
    and myvalue<>'c'