码迷,mamicode.com
首页 > 数据库 > 详细

Oracle instr()函数替代like实现模糊查询

时间:2014-11-14 18:05:33      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:oracle   where   title   

    需要查询One Table中的Message栏位中的值是否包含在Two Table的Message栏位中:

        select a.Message,b.Message from One a , Tow b where instr(a.Message,b.Message)>0;(b.Message包含在a.Message中)

    

    

        instr(title,‘Oracle’)>0 相当于like

        instr(title,‘Oracle’)=0 相当于not like


Oracle instr()函数替代like实现模糊查询

标签:oracle   where   title   

原文地址:http://kxtand.blog.51cto.com/4227129/1576538

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!