select * from tab where zd like '*a*'
目的是选出所有zd字段里面包含a的
再现等待

解决方案 »

  1.   

    select * from tab where zd like '%a%'
    把*改成%
      

  2.   

    select * from tab where zd like '%a%'
      

  3.   

    select * from tab where zd like '?a?' 看看效果
      

  4.   

    '%' 任意匹配;  '_ '单个字符匹配
    select * from tab where zd like '%a%' 进行左右匹配;select * from tab where zd like '%a' 进行左匹配;select * from tab where zd like 'a%' 进行右匹配;select * from tab where zd like '_a%' 进行第二个字符是a 匹配;
      

  5.   

    我的做法是:
    select * from tab where zd like '%'+a+'%'