您的当前位置:首页正文

mysql怎么将查询结果导出为excel

来源:花图问答

利用查询语句直接导出。

(推荐教程:)

举例:

select * into outfile '/data/var-3307/catid.xls' from help_cat where 1 order by cat_id desc limit 0,20;
select * into outfile '导出文件存放目录' from 表面和查询条件等信息

请注意权限问题,如果实在不行,放在/tmp 目录下。