龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 数据库类 > MySQL 技术 >

mysql导出excel文件的几种方法

时间:2011-03-14 23:24来源:未知 作者:admin 点击:
分享到:
mysql教程 导出excel文件的几种方法 方法一 php教程 用mysql的命令和shell select * into outfile './bestlovesky.xls' from bestlovesky where 1 order by id desc limit 0, 50; 方法二 把bestlovesky.xls以文本方式打开,然

mysql教程导出excel文件的几种方法

方法一

php教程用mysql的命令和shell

select * into outfile './bestlovesky.xls' from bestlovesky where 1 order by id desc  limit 0, 50;

方法二 把bestlovesky.xls以文本方式打开,然后另存为,在编码选择ansi编码,保存

echo "select id,name from bestlovesky where 1 order by id desc limit 0, 50;"| /usr/local/mysql/bin/mysql -h127.0.0.1-uroot -p123456 > /data/bestlovesky.xls


方法三

mysql   -uroot   -p   -e   "select   *   from   test.table2 "   >   d:a.xsl

mysql导出excel文件的几种方法更多相关文章

精彩图集

赞助商链接