The CONCAT function can concatenate two strings.
Syntax
CONCAT(c1,c2)
Parameters
| Parameter | Description |
|---|---|
| c1 | The string. The string type can be CHAR, VARCHAR2, NCHAR, NVARCHAR2, or CLOB. |
| c1 | The string. The string type can be CHAR, VARCHAR2, NCHAR, NVARCHAR2, or CLOB. |
Return type
The return type is the same as the data type of c1.
Examples
In this example, the CONCAT function is used to concatenate the '010-' character and the '88888888' character.
Execute the following statement:
SELECT concat('010-','88888888')||'to 23'XXXX phone FROM DUAL;
The following query result is returned:
+-------------------+
| XXXX phone |
+-------------------+
| 010-88888888 to 23 |
+-------------------+