October 2002
Intermediate to advanced
1024 pages
27h 26m
English
The output lines from a query are too long. They wrap around and make a mess of your screen.
Use vertical output format.
Some queries generate output lines that are so long they take up more than one line on your terminal, which can make query results difficult to read. Here is an example that shows what excessively long query output lines might look like on your screen:[10]
mysql> SHOW FULL COLUMNS FROM limbs;
+-------+-------------+------+-----+---------+-------+-------------------------
--------+
| Field | Type | Null | Key | Default | Extra | Privileges
|
+-------+-------------+------+-----+---------+-------+-------------------------
--------+
| thing | varchar(20) | YES | | NULL | | select,insert,update,ref
erences |
| legs | int(11) | YES | | NULL | | select,insert,update,ref
erences |
| arms | int(11) | YES | | NULL | | select,insert,update,ref
erences |
+-------+-------------+------+-----+---------+-------+-------------------------
--------+An alternative is to generate
“vertical” output with each column
value on a separate line. This is done by terminating a query with
\G rather than with a
; character or with \g.
Here’s what the result from the preceding query
looks like when displayed using vertical format:
mysql> SHOW FULL COLUMNS FROM limbs\G *************************** 1. row *************************** Field: thing Type: varchar(20) Null: YES Key: Default: NULL Extra: Privileges: select,insert,update,references ...