Home > Database > Mysql Tutorial > 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
Release: 2023-09-09 09:45:03
forward
1060 people have browsed it

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)
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template