Terminating a MySQL query with \G
instead of ;
will cause MySQL to return the result set in vertical format, which is sometimes easier to read if the number of returned columns is large.
Example:
mysql> SELECT * FROM help_keyword LIMIT 3\G
*************************** 1. row ***************************
help_keyword_id: 0
name: JOIN
*************************** 2. row ***************************
help_keyword_id: 1
name: REPEAT
*************************** 3. row ***************************
help_keyword_id: 2
name: SERIALIZABLE
3 rows in set (0.00 sec)
My question asked out of pure curiosity: Is there any rationale behind choosing the character combination \G
?