Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

displaying results vertically in oracle

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?

like image 270
pseudosudo Avatar asked Sep 17 '25 20:09

pseudosudo


1 Answers

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.
like image 50
Tony Andrews Avatar answered Sep 20 '25 11:09

Tony Andrews