PLSQL | CONCAT Function
The string in PL/SQL is actually a sequence of characters with an optional size specification.
The characters could be numeric, letters, blank, special characters or a combination of all.
The CONCAT function allows you to concatenate two strings together. To CONCAT more than two values, we can nest multiple CONCAT function calls.
Syntax:
CONCAT( string1, string2 )
Parameters Used:
- string1: It is used to specify the first string to concatenate.
- string2: It is used to specify the second string to concatenate.
Supported Versions of Oracle/PLSQL:
- Oracle 12c
- Oracle 11g
- Oracle 10g
- Oracle 9i
- Oracle 8i
Example-1:
DECLARE Test_String string(10) := 'Hello '; Test_String2 string(10) := 'world!'; BEGIN dbms_output.put_line(CONCAT(Test_String, Test_String2)); END;
Output:
Hello world!
Example-2:
DECLARE Test_String string(10) := 'Geeks'; Test_String2 string(10) := 'For'; Test_String3 string(10) := 'Geeks'; BEGIN dbms_output.put_line(CONCAT(CONCAT(Test_String, Test_String2), Test_String3)); END;
Output:
GeeksForGeeks
Recommended Posts:
- PLSQL | COS Function
- PLSQL | LOG Function
- PLSQL | ABS Function
- PLSQL | MOD Function
- PLSQL | SIN Function
- PLSQL | LN Function
- PLSQL | EXP Function
- PLSQL | CHR Function
- PLSQL | LEAST Function
- PLSQL | TAN Function
- PLSQL | LENGTHB Function
- PLSQL | LENGTHC Function
- PLSQL | LENGTH Function
- PLSQL | INITCAP Function
- PLSQL | LENGTH4 Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


