By using \G at the end of a MySQL statement, it returns the output in vertical format instead of tabular format. Consider the following example -
mysql> Select curdate(); +------------+ | curdate() | +------------+ | 2017-11-06 | +------------+ 1 row in set (0.00 sec) mysql> Select CURDATE()\G *************************** 1. row *************************** CURDATE(): 2017-11-06 1 row in set (0.00 sec)
From the above example, you can understand the difference of using \G at the end of a MySQL statement. It returns the same output in vertical format instead of tabular format.
The above is the detailed content of How does MySQL generate output in vertical format instead of tabular format?. For more information, please follow other related articles on the PHP Chinese website!