What is the difference between "||" operator and concat in Oracle?

Can I explain the difference between concat() and the || in oracle?

Which one is better in terms of performance?

+10
sql database oracle
Jul 09 2018-12-12T00:
source share
2 answers

There is no functional difference.

|| is the standard ANSI concatenation operator (although, unfortunately, not every <cough>SQL Server</cough> chooses to support the standard). Many databases support the CONCAT function, so it may be easier to port the code using CONCAT to different databases.

+14
Jul 09 '12 at 22:18
source share

'concat' can only work with two variables or columns, while a concat operation can be performed for any number of variables or columns.

+1
Mar 25 '13 at 23:23
source share



All Articles