当前位置: 代码迷 >> J2EE >> oracle 语法有关问题,怎么搜索一个表中的字段里包含'aa'的行
  详细解决方案

oracle 语法有关问题,怎么搜索一个表中的字段里包含'aa'的行

热度:19   发布时间:2016-04-22 01:52:53.0
oracle 语法问题,如何搜索一个表中的字段里包含'aa'的行
oracle 语法问题,如何搜索一个表中的字段里包含'aa'的行

------解决方案--------------------
SQL code
select * from table_test t where t.field like '%aa%'
------解决方案--------------------
select * from table_test t where instr('aa',t.field )>0

如果字段不确定,就需要全文索引

------解决方案--------------------
探讨
select * from table_test t where instr('aa',t.field )>0

如果字段不确定,就需要全文索引

------解决方案--------------------
就like就行了
select * from table_test t where t.field like '%aa%'

------解决方案--------------------
探讨
SQL code
select * from table_test t where t.field like '%aa%'



模糊查询,所有的数据库都一样

------解决方案--------------------
select * from table_test t where t.field like '%aa%'
  相关解决方案