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

后端 未结 12 890
你的背包
你的背包 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:04

    You might also find this useful (non-Windows only):

    mysql> pager less -SFX
    mysql> SELECT * FROM sometable;
    

    This will pipe the outut through the less command line tool which - with these parameters - will give you a tabular output that can be scrolled horizontally and vertically with the cursor keys.

    Leave this view by hitting the q key, which will quit the less tool.

提交回复
热议问题