PL/SQL Concat

The CONCAT function returns string1 concatenated with string2.

Concat syntax

CONCAT( string1, string2 )

Concat example

 
select concat('ab', 'c') from dual;		

Result: abc


select concat('123', '45') from dual;

Result: 12345


select concat('PL/SQL', ' Reference') from dual;

Result: PL/SQL Reference

Concat example

STUDENT_IDFIRST_NAMELAST_NAMECITY
1DanielSCOTTNew York
2AnthonySIMMONSChicago
3SophiaTHOMPSONLos Angeles
select	s.STUDENT_ID, 
		concat(concat(s.FIRST_NAME,', '), s.LAST_NAME) as FULL_NAME, 
		s.CITY 
from STUDENTS s ;
STUDENT_IDFULL_NAMECITY
1Daniel, SCOTTNew York
2Anthony, SIMMONSChicago
3Sophia, THOMPSONLos Angeles