tags:

views:

39

answers:

1

I'm enamored with mysql's \G feature which I find very useful when SELECTing from tables with many columns. Is there a similar feature in oracle which displays each column on its own line? How do people normally deal with this issue?

+3  A: 

I use Tom Kyte's print_table procedure

For example:

SQL> exec print_table('select * from emp where empno=7839')
EMPNO                         : 7839
ENAME                         : KING
JOB                           : PRESIDENT
MGR                           :
HIREDATE                      : 17-nov-1981 00:00:00
SAL                           : 100
COMM                          : 500
DEPTNO                        : 10
-----------------

PL/SQL procedure successfully completed.
Tony Andrews