Column-wise display of rowdata using sql
518523Feb 6 2007 — edited Feb 6 2007Is it possible to print the results of the sql query column wise?
e.g I have a table table1 with 3 columns A, B, C the values in one of the rows are 30, 40, 50 resp.
I want to display the results of the query (where A=30) in the following format
A: 30
B: 40
C: 50
(instead of
A B C
-- -- --
40 40 50
)
I know that the column name could be pulled from the all_tab_columns table. But how to use it in the select query on table1? Is it possible to do this using a single sql query?