当前位置:Gxlcms > 数据库问题 > oracle 实现多字段匹配一个关键字查询语句

oracle 实现多字段匹配一个关键字查询语句

时间:2021-07-01 10:21:17 帮助过:11人阅读

oracle 实现多字段匹配一个关键字查询语句:
有两种方法(经测试,10g中不能用,11g才行):

第一种. select * from table where (‘字段名1‘ ||‘字段名2‘ ||...) like "%keyValue%";

第二种:(1)如果是两个字段的话:
select * from table where concat(字段名1,字段名2) like "%keyValue%";
(2)如果是多个字段的话:
select * from table where concat(concat(concat(concat(字段名1,字段名2),字段名3)字段名4)...) like "%keyValue%";

oracle 实现多字段匹配一个关键字查询语句

标签:不能   查询   table   匹配   查询语句   两种方法   ora   oracl   blog   

人气教程排行