今天才知道MYSQL有这个方便的用法,无知了。
\G 放到sql语句后,可以使每个字段打印到单独的行,如:
mysql> select * from user_msg limit 2 \G;
*************************** 1. row ***************************
uid: 1
today_msg: 0
today_recv: 1
recvmsgcount: 59
sendmsgcount: 0
twoday1: 0
treeday1: 0
towday2: 0
treeday2: 0
todayfist: 0
*************************** 2. row ***************************
uid: 2
today_msg: 0
today_recv: 1
recvmsgcount: 292
sendmsgcount: 2693
twoday1: 0
treeday1: 0
towday2: 0
treeday2: 0
todayfist: 0
2 rows in set (0.02 sec)