Karthik G

Karthik G

  • NA
  • 16
  • 4.2k

same columns ,multiple rows

May 6 2016 2:12 AM

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)