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

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

    I wrote pspg - https://github.com/okbob/pspg

    This pager is designed for tabular data - and MySQL is supported too.

    MariaDB [sakila]> pager pspg -s 14 -X --force-uniborder --quit-if-one-screen
    PAGER set to 'pspg -s 14 -X --force-uniborder --quit-if-one-screen'
    MariaDB [sakila]> select now();
    MariaDB [sakila]> select * from nicer_but_slower_film_list limit 100;
    

提交回复
热议问题