When you run queries on the command line in MySQL, you can optionally use " \ G " as the terminator of statements, and instead of the resulting loops displayed horizontally across the screen, it will list each column vertically, with the corresponding data on the right. Is there a way to do the same or similar with the DB2 command line utility?
MySQL regular result example
mysql> select * from tagmap limit 2; +----+---------+--------+ | id | blog_id | tag_id | +----+---------+--------+ | 16 | 8 | 1 | | 17 | 8 | 4 | +----+---------+--------+
Example MySQL Alternative Result:
mysql> select * from tagmap limit 2\G *************************** 1. row *************************** id: 16 blog_id: 8 tag_id: 1 *************************** 2. row *************************** id: 17 blog_id: 8 tag_id: 4 2 rows in set (0.00 sec)
Obviously, this is much more useful when columns are large rows or when there are many columns in the result set, but this demonstrates formatting better than I can probably explain.
source share