今天才知道MYSQL有這個(gè)方便的用法痊银,無知了。
\G 放到sql語句后,可以使每個(gè)字段打印到單獨(dú)的行动猬,如:
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)