Home  >  Article  >  Database  >  How does MySQL generate output in vertical format instead of tabular format?

How does MySQL generate output in vertical format instead of tabular format?

WBOY
WBOYforward
2023-09-09 09:45:03959browse

MySQL 如何以垂直格式而不是表格格式生成输出?

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete