This function brings all the columns into a single column seperated by any delimiter :
syntax:
syntax:
SELECT LISTAGG(last_name, ';')
WITHIN GROUP (ORDER BY hire_date, last_name) "Emp_list"
from table
this function is introduced in oracle 11g and prior to that this can be acheived by using the following
WITH Q AS ( SELECT 1 X FROM DUAL UNION ALL SELECT 2 FROM DUAL UNION ALL SELECT 3 FROM DUAL UNION ALL SELECT 9 FROM DUAL ) SELECT WM_CONCAT(Q.X) FROM Q |