I am working on ORACLE STORED PROCEDURES and I have a doubt. I have a query which fetches more than 1 row and I want to store all those 3 row\'s values in 1 Variable. Can anybod
Depending on your Oracle version(>= 11G(11.2)), you can use LISTAGG:
SELECT LISTAGG(STUDENT_NAME,',') WITHIN GROUP (ORDER BY STUDENT_NAME) FROM STUDENT.STUDENT_DETAILS WHERE CLASS_ID= 'C';
EDIT: If your Oracle version is inferior to 11G(11.2), take a look here