mysql的pager命令
pager介绍
You can configure MySQL Shell to use an external pager tool such as less or more. Once a pager is configured, it is used by MySQL Shell to display the text from the online help or the results of SQL operations.
pager就像Linux中的管道符,将SQL的执行结果使用pager后面的命令进行过滤
设置方法:pager 命令
mysql> pager grep rows PAGER set to 'grep rows'
mysql> select e.emp_no,salary from salaries s join employees e on s.emp_no=e.emp_no where first_name='Adam'; 2384 rows in set (1.35 sec)
这样输出结果就只有行数了
取消pager
设置完之后需要通过nopager取消,否则,只能通过重启来取消pager
mysql> nopager;
PAGER set to stdout
posted on 2021-04-22 15:10 hopeless-dream 阅读(433) 评论(0) 编辑 收藏 举报