What is the usage of concat function in oracle?
In Oracle, the CONCAT function is used to combine two or more strings.
Syntax:
CONCAT(string1, string2)
Arguments:
- string1: the first string to be connected
- The second string to be connected.
Example:
SELECT CONCAT(‘Hello’, ‘ ‘, ‘World’) FROM dual;
Result: Hello World
Please note:
- The CONCAT function can combine multiple strings by simply listing the strings to be joined in order.
- If there is a NULL value in the strings to be concatenated, the CONCAT function will return NULL.
- The CONCAT function can be used in conjunction with other string functions, such as SUBSTR, UPPER, LOWER, and so on.