List:General Discussion« Previous MessageNext Message »
From:Rick James Date:April 30 2013 10:52pm
Subject:RE: how to list record in column (instead of a row)
View as plain text  
Or 
    SELECT ... \G
(replace ';' with '\G')

> -----Original Message-----
> From: hsv@stripped [mailto:hsv@stripped]
> Sent: Wednesday, April 24, 2013 9:55 AM
> To: mysql list
> Subject: Re: how to list record in column (instead of a row)
> 
> >>>> 2013/04/24 09:06 -0700, Rajeev Prasad >>>>
> this table has many columns and only 1 record. select * from table;
> generates an unreadable list. how can i list the record as in two
> columns? (column name and its value)? i looked at UNPIVOT, but could
> not get it to work.
> SQL> select * from table UNPIVOTE INCLUDE NULLS;
>                      select * from table UNPIVOTE INCLUDE NULLS
> * ERROR at line 1: ORA-00933: SQL command not properly ended
> <<<<<<<<
> From MySQL client, if started with flag '-G':
> 	select * from table
> 	ego
> 
> For the same program there is flag '--auto-vertical-output'.
> 
> But it seems you are using Oracle; this is MySQL list.
> In any case, you wrote both 'UNPIVOT' and 'UNPIVOTE'; I suspect the
> former is better.
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql

Thread
how to list record in column (instead of a row)Rajeev Prasad24 Apr
  • Re: how to list record in column (instead of a row)hsv24 Apr
    • Re: how to list record in column (instead of a row)spameden28 Apr
    • RE: how to list record in column (instead of a row)Rick James30 Apr