Oracle Study Notes 01: The function concat () difference in Oracle and Mysql

Oracle Study Notes 01: The function concat () difference in Oracle and Mysql

 

Function concat () function: string link

Difference :

  In 1-Oracle: CONCAT () allows only two parameters;

  2-Mysql types: CONCAT () can be connected to a plurality of parameters

 

Examples

Mysql

select * 
from S_MAINTAIN_CATEGORY a 
where "del_flag"=0 and "name" like concat('%','客户')
order by "type" desc

The Oracle ( () function in order to connect the plurality of strings by multiplexing the concat )

select * 
from S_MAINTAIN_CATEGORY a 
where "del_flag"=0 and "name" like concat(concat('%','客厅'),'%')
order by "type" desc

 

 

CONCAT (a string, the string 2, string 3, ...): The 1 string, the string 2, string 3, and so the string together. 
Please note, Oracle's CONCAT () allows only two parameters; 

Guess you like

Origin www.cnblogs.com/wobuchifanqie/p/11593107.html