How to best display in Terminal a MySQL SELECT returning too many fields?

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

12 Answers
12

Leave a Comment