How to best display in Terminal a MySQL SELECT returning too many fields?

后端 未结 12 891
你的背包
你的背包 2020-12-04 04:32

I\'m using PuTTY to run:

mysql> SELECT * FROM sometable;

sometable has many fields and this results in many columns trying

12条回答
  •  半阙折子戏
    2020-12-04 05:12

    Try enabling vertical mode, using \G to execute the query instead of ;:

    mysql> SELECT * FROM sometable \G
    

    Your results will be listed in the vertical mode, so each column value will be printed on a separate line. The output will be narrower but obviously much longer.

提交回复
热议问题