Unreadable output? Display query results vertically!
The MySQL Command Line Interface is an essential tool to test queries and manage databases.
Unfortunately, when the output of a query has a lot of columns, they break onto new lines and the results are unreadable.
If you don't have enough screen-space try \G
modifier. Use it instead of semicolon and the ouput will be gracefully rendered vertically.
So SELECT * FROM user;
becomes SELECT * FROM user\G
.
EDIT: Simply using mysql --auto-vertical-output
the interface will automatically detect if the output is wider than your terminal and display it vertically.
Written by Lorenzo Novaro
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#