select count(1) from table into outfile '/tmp/test.xls';加粗的部分为查询sql 转载于:https://www.cnblogs.com/holleworld/p/7611482.html