See mysql command output vertically

When you work on mysql server and hit some command in mysql prompt,you get the output in horizontal way.
For eg. I hit the command, select emailid from linuxtable where user = ‘sharad’; and this table has lots of fields . In that case the output looks weird.
Rather than seeing the output Horizontally in mysql you can also see the output Vertically.

For seeing vertically you have to suffix this switch ( G ) at the end of command

Lets see the example:

mysql> show table status where Name = 'tutorials_tbl' G;
*************************** 1. row ***************************
           Name: tutorials_tbl
         Engine: InnoDB
        Version: 10
     Row_format: Compact
           Rows: 1
 Avg_row_length: 16384
    Data_length: 16384
Max_data_length: 0
   Index_length: 0
      Data_free: 7340032
 Auto_increment: 2
    Create_time: 2013-08-10 16:16:13
    Update_time: NULL
     Check_time: NULL
      Collation: latin1_swedish_ci
       Checksum: NULL
 Create_options: 
        Comment: 
1 row in set (0.00 sec)

ERROR: 
No query specified

mysql> 

If you do not use G ,this is how it looks, below is the sample of it

mysql
mysql

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.