函數concat()作用:鏈接字符串
區別:
1-Oracle中:CONCAT()只允許兩個參數;
2-Mysql種:CONCAT()可以連接多個參數
示例:
mysql
select *
from S_MAINTAIN_CATEGORY a
where "del_flag"=0 and "name" like concat('%','客戶')
order by "type" desc
Oracle(可以通過複用concat()函數達到連接多個字符串的目的)
select *
from S_MAINTAIN_CATEGORY a
where "del_flag"=0 and "name" like concat(concat('%','客廳'),'%')
order by "type" desc
CONCAT(字串1, 字串2, 字串3, …): 將字串1、字串2、字串3,等字串連在一起。
請注意,Oracle的CONCAT()只允許兩個參數;