Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How can MySQL produce the output in a vertical format rather than tabular format?
By using \G at the end of MySQL statement, it returns the output in a vertical format rather than a tabular format. Consider the example below −
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 example above, the difference of using \G at the end of the MySQL statement can be understood. It returns the same output in a vertical format rather than a tabular format.
Advertisements
