how to get enames with comma seperated values by deptwise
on emp table?

Answer Posted / g

SELECT DEPT.DEPT_ID,LIST_AGG(E.EMP_NAME) FROM EMP E,DEPT D WHERE E.DEPT_ID=DEPT.DEPT_ID GROUP BY DEPT.DEPT_ID;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a commit statement be executed as part of a trigger?

702


What is a unique constraint?

685


When is a declare statement required?

764


What packages(if any) has oracle provided for use by developers?

5153


How can we store rows in PL/SQL using array?

766






what is a field in a database ? : Sql dba

630


How do I edit a trigger in sql developer?

623


What is difference between procedure and trigger?

603


What is error ora-01000: maximum open cursors exceeded

689


How can I see all tables in sql?

640


What does the argument [or replace] do?

677


Explain constraints in sql?

680


Is there a way to automate sql execution from the command-line, batch job or shell script?

644


What is sql resultset?

634


How do I run a program in pl sql?

590