3
Answers

same columns ,multiple rows

Karthik G

Karthik G

8y
289
1

my table structure is given bellow

deptid  ename 
10      CLARK,KING,MILLER 
20      ADAMS,FORD,JONES,SCOTT,SMITH

but i want the output sould be like

deptid   ename  
10       CLARK   
         KING       
         MILLER 
------------------
20       ADAMS       
         FORD        
         JONES       
         SCOTT         
         SMITH

please tell me how to do it in sql

Answers (3)