轉自:https://blog.csdn.net/jumtre/article/details/38020389 ,可以再加上in的使用, select * from dt_01 t where t.column1 in ('zzzz','zbbbbb'),
首先想到的就是contains,contains用法如下:
select * from students where contains(address, 'beijing')
但是,使用contains謂詞有個條件,那就是列要建立索引,也就是說如果上面陳述句中students表的address列沒有建立索引,那么就會報錯,
好在我們還有另外一個辦法,那就是使用instr,instr的用法如下:
select * from students where instr(address, 'beijing') > 0
另外,還有個笨辦法,那就是使用like,說到這里大家應該知道怎么做了吧:
select * from students where address like '%beijing%'
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/1139.html
標籤:Oracle
