日期:2014-05-19  浏览次数:20685 次

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%'