MYSQL  \G 用法:查询结果按列打印

今天才知道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)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2021-06-18
  • 2021-11-30
猜你喜欢
  • 2022-12-23
  • 2021-11-01
  • 2021-08-07
  • 2021-05-15
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案