如何在DElPHI中实现模糊查询?

解决方案 »

  1.   

    用SQL语句的LIKE,把写好的SQL语句加入QUERY里执行就行了
      

  2.   

    Query1.close;
    Query1.Sql.clear;
    Query1.Sql.add('Select * from Table where Name = ''%5%''');
    Query1.Open;
    查出Table表里Name里包含5的所有记录
    结贴吧
      

  3.   

    查找姓王的:
    select * From table where 姓名 like '%王%'
      

  4.   

    to:geyobing(银翼天使) 
    是Query1.Sql.add('Select * from Table where Name like ''%5%''')吧?
    感谢你!