2

Is there any way to get each column name and column value of each row using cursor. As below, i have a Cursor c loop through each row of table T

 FOR c IN (SELECT * T)  
 LOOP
     --Something like dbms_output.put_line(c.columname : c.columnvalue); 
 END LOOP

P/s:Sorry my bad english. English is not my native language

SonalPM
  • 1,317
  • 8
  • 17
user2090487
  • 107
  • 1
  • 3
  • 7

1 Answers1

1

You would need to use the DBMS_SQL package instead of a simple FOR loop cursor. It's quite complex, but luckily Tom Kyte has already done all the work here

Tony Andrews
  • 129,880
  • 21
  • 220
  • 259