Home > Database > Mysql Tutorial > body text

MySQL导出excel的两种步骤

WBOY
Release: 2016-06-07 16:25:34
Original
1342 people have browsed it

MySQL导出excel的两种方法 第一种:mysql select * into outfile '文件存放路径' from 表名;如:select * into outfile 'd:b.xls' from t_login;第二种:mysql -uroot -p -e "select * from 数据库名.表名" 文件存放路径如:mysql -uroot -p -e "select * fro

MySQL导出excel的两种方法
第一种:
mysql> select * into outfile '文件存放路径' from 表名;
如:select * into outfile 'd:b.xls' from t_login;
第二种:
mysql -uroot -p -e "select * from 数据库名.表名" > 文件存放路径
如:
mysql -uroot -p -e "select * from amwayfc.t_login" > d:a.txt
Copy after login
1 楼 yelangking 2014-04-10   这个还没遇到过,收藏。 2 楼 yelangking 2014-04-10   不过想请教一下的是,数据量大的时候,会不会有影响啊? 3 楼 030710314 2014-04-10   导出的excel的列和数据库中的列不对应,还是导出txt比较好 4 楼 truth99 前天   yelangking 写道不过想请教一下的是,数据量大的时候,会不会有影响啊?
应该和查询速度有关 5 楼 truth99 前天   030710314 写道导出的excel的列和数据库中的列不对应,还是导出txt比较好
看需要吧
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!