mysql> select b.username,a.subject,a.money,FROM_UNIXTIME(a.ctime) from shop_pay a INNER JOIN common_member b on a.uid=b.uid where a.ctime>='1429428970' and a.ctime<='1429689355' and a.`status` = 2 into outfile '/tmp/test.xls';…
使用第一种方式如果数据中有换行符的话会自动换行,但使用第二种方式就不会出现这种效果了.两种方式自己选择哈 1:select * from into outfile 'c:/Users/a.xls' table where xxx 将查询出的数据导出到c盘下的users文件夹 2:在Navicat使用sql将需要导出的数据查出,然后点击上方的导出按钮(txt格式就行),将数据导出到指定路径,然后打开wps或excel(最好是高版本),在上方菜单栏选择[数据],点击[导入数据],选择数据源,…