当前位置: 代码迷 >> Oracle管理 >> 容易模糊查询
  详细解决方案

容易模糊查询

热度:123   发布时间:2016-04-24 04:14:40.0
简单模糊查询
select * from cage where location like '[ABV]%';

想查询地址中带有ABV这三个字符的记录,为啥出错不出结果

------解决方案--------------------
你这种只能用正则表达式了
select * from cage where REGEXP_LIKE(location,'A
------解决方案--------------------
B
------解决方案--------------------
V')

------解决方案--------------------
正则 是正解,
但对于一般开发,最简单理解的是 select * from cage where location like '%A%‘ or  location like '%B%‘  or  location like '%V%‘
  相关解决方案