那位大哥教我一下sql模糊查询语句是怎么写的,只要大致的语法格式

解决方案 »

  1.   

    select * from table1 where a like '%abc%'上例中表示要搜索字段a中所有包含abc字符串的记录,%是通配符
      

  2.   

    add('select * from table where a like "%XXX%"')
      

  3.   

    select * from table1 where a like '%abc%'或:select * from table1 where charindex('abc',a)>0另SQLServer中 charindex 比 like 快!
      

  4.   

    select * from a where field like '%dfd%'
    我只会瞎说
      

  5.   

    like 'a%'左匹配
    like '%a'右匹配
    like '%a%'模糊查找
      

  6.   

    select * from '%string%'
      

  7.   

    select *
    from table 
    where a like '%a%
    and   条件1 and 条件2
      

  8.   


    v1:=adotable1.fieldbyname('ping1').asstring;
    v1:=adotable1.fieldbyname('ping1').asstring;adoquer1.sql.add(select sum(m1) as mm2 where ping1 like '%v1%' and  ping2 likd  '%v1%''); 上边的代码好像不行啊。???