Oracle数据表中有一个字段名为projectname,现在想对它进行模糊查询。要求如下:如果字段内容形为:实验小学综合楼,小学围墙改建,新建实验小学,当我输入查找关键字“小学”时,能够将这三条记录都找出来。

解决方案 »

  1.   

    select * from 数据表 where projectname like '%小学%'
      

  2.   

    好像所有数据库的模糊查询都是like啊,标准SQL的关键字
      

  3.   

    select * from tb where projectname like '%小学%'select * from tb where instr(projectname,'小学') > 0
      

  4.   

    select * from 数据表 where projectname like '%小学%'
      

  5.   

    select * from 数据表 where projectname like '%小学%'