mysql> select id, name from sometable\g
+----+-------------------+
| id | name |
+----+-------------------+
| 1 | Geddy Lee |
| 2 | Neil Peart |
| 3 | Alex Lifeson |
+----+-------------------+
3 rows in set (0.00 sec)
Using the same query with the "\G" terminator:
mysql> select id, name from sometable\G
*************************** 1. row ***************************
id: 1
name: Geddy Lee
*************************** 2. row ***************************
id: 2
name: Neil Peart
*************************** 3. row ***************************
id: 3
name: Alex Lifeson
3 rows in set (0.00 sec)
For output with many columns, the second option is often preferred as it is more readable.
No comments:
Post a Comment