There is only one truth. It is the source.

Vertically displaying columns in MySQL query

February 5, 2016

Tags: mysql

This is similar to http://thatdomainistaken.com/blog/2014/1/2/4/ for MySQL. Put \G at the end of the query instead of a semicolon.

Before

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+
2 rows in set (0.02 sec)

After:

mysql> show databases\G
*************************** 1. row ***************************
Database: information_schema
*************************** 2. row ***************************
Database: test
2 rows in set (0.00 sec)