I'm using PuTTY to run:
mysql> SELECT * FROM sometable;
sometable
has many fields and this results in many columns trying to be displayed in the terminal. The fields wrap onto the next line so it is very hard to line up column titles with field values.
What solutions are there for viewing such data in terminal?
I don't have nor want access to phpMyAdmin – or any other GUI interfaces. I'm looking for command-line solutions such as this one: Save MySQL Query results into text or CVS file
Best Answer
Terminate the query with
\G
in place of;
. For example:This query displays the rows vertically, like this: