MYSQL: use the G parameter to change the display mode of the output result set bitsCN.com
MYSQL: use the/G parameter to change the display mode of the output result set.
Use the/G parameter in the MYSQL command line to display the output by column. It is useful when you need to view the values of each field in the table.
The output of common SQL commands is as follows:
[SQL]
Mysql> select * from t_goods;
+ ------ + ------------ + ---------- + ------------ + -----------------------------------
----------------------------- +
| Id | goods_name | quantity | add_date | description
|
+ ------ + ------------ + ---------- + ------------ + -----------------------------------
----------------------------- +
| 1 | MYSQL5 | 50 | 2012-12-12 | A book that has been read but is I
N good condition. See the seller's listing for full details and descr iption
Any imperfections. |
+ ------ + ------------ + ---------- + ------------ + -----------------------------------
----------------------------- +
The output using the/G option is as follows:
[SQL]
Mysql> select * from t_goods/G
* *************************** 1. row ***************************
Id: 1
Goods_name: MYSQL5
Quantity: 50
Add_date: 2012-12-12
Description: A book that has been read but is in good condition. See t
He seller's listing for full details and description of any imperfections.
Note: The/G is an upper-case letter and cannot be lower-case. after the/G parameter is used, the SQL statement does not have a separator. if a separator is added, an error is returned: no query specified "error.
This display effect is the same as the-E parameter of the MYSQL command. After the-E parameter is used, the result set is displayed as a column by default:
[SQL]
C:/Users/qxl> mysql-uroot-E
Welcome to the MySQL monitor. Commands end with; or/g.
Your MySQL connection id is 13
Server version: 5.1.28-rc-community MySQL Community Server (GPL)
Type 'help; 'or'/h' for help. type'/C' to clear the buffer.
Mysql> use test;
Database changed
Mysql> select * from t_goods;
* *************************** 1. row ***************************
Id: 1
Goods_name: MYSQL5
Quantity: 50
Add_date: 2012-12-12
Description: A book that has been read but is in good condition. See t
He seller's listing for full details and description of any imperfections.
BitsCN.com