Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

A simple output pivot option for sqlplus (or SQLcl)

Martin PreissApr 7 2015 — edited Jan 11 2016

In postgres' command line client (psql) there is a nice output pivoting switch to display records in a vertical view:

select * from t;

a | b | c

---+---+---

1 | 2 | 3

4 | 5 | 6


--> Switch display with \x


select * from t;


-[ RECORD 1 ]

a | 1

b | 2

c | 3

-[ RECORD 2 ]

a | 4

b | 5

c | 6

This would make data analysis simpler for result sets with many columns. Of course there are some useful helper functions (Tom Kyte's print_table, Tanel Poder's printtab), but I would prefer a simple built-in mechanism providing this.

Comments
Post Details
Added on Apr 7 2015
11 comments
980 views