In Oracle’s SQL*Plus, the results of a SELECT are displayed in a tabular manner. Is there a way to display a row in a key-value manner (like MySQL’s \G option)?
The database I am working on (the schema is not defined by me) has a bunch of columns named e.g. YN_ENABLED (YN = yes no) which are CHAR(1). So when I do a query I get a result like
ID_MYTABLE Y Y Y
------------ - - -
3445 Y N Y
So it’s not really clear which columns have which values (without having the schema open in another window).
Not built in to SQL PLus, but Tom Kyte has provided a procedure called print_table that does this. You would run it like this: