通过在MySQL语句的末尾使用\ G,它以垂直格式而不是表格格式返回输出。考虑下面的示例-
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)
从上面的示例中,可以理解在MySQL语句末尾使用\ G的区别。它以垂直格式而不是表格格式返回相同的输出。