我想实现搜索的功能,就是查询某个字段中符合比如“aa”这样的所有数据
不知道怎么学sql语句,在线等,急

解决方案 »

  1.   

    select * from table where F1 like '%aa%'
      

  2.   

    select *
    from ta
    where col like '%aa%'
      

  3.   

    select * from tb where patindex('%aa%',col)>0
    select * from tb where charindex('aa',col)>0
    select * from tb where col like '%aa%'
      

  4.   

    select * from table where F1 like '%aa%'
      

  5.   

    select * from 表名 where 字段 like '%aa%'