找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 3222|回复: 0
打印 上一主题 下一主题

如何导出Mysql数据库表为xls文件的查询语句

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-27 21:42:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

select uid,username,password,email,lastip,lastvisit into outfile 'd:/50w.xls' from cdb_members where lastip >'' order by uid desc limit 0,500000;
select uid,username,password,email,lastip,lastvisit into outfile 'd:/50w-100w.xls' from cdb_members where lastip >'' order by uid desc limit 500001,1000000;
select uid,username,password,email,lastip,lastvisit into outfile 'd:/all2.xls' from cdb_members where lastip >'' order by uid desc limit 1000001,10;
select uid,username,password,email,lastip,lastvisit into outfile 'd:/all2.xls' from cdb_members where lastip >'' order by uid desc limit 0,500000;
select uid,username,password,email,regip,from_unixtime(regdate) as regdate,lastip, from_unixtime(lastvisit) as lastvisit from cdb_members where username ='admin'
select uid,username,password,email,regip,from_unixtime(regdate) as regdate,lastip, from_unixtime(lastvisit) as lastvisit  into outfile 'd:/admin.xls'  from cdb_members where groupid <5;
select uid,username,password,email,regip,from_unixtime(regdate) as regdate,lastip, from_unixtime(lastvisit) as lastvisit  into outfile 'd:/50w.date.data.xls'  from cdb_members where lastip >'' order by uid desc limit 0,500000;

select uid,username,password,email,regip,from_unixtime(regdate) as regdate,lastip, from_unixtime(lastvisit) as lastvisit  into outfile 'd:/50w.date.data.xls'  from cdb_members  order by uid desc limit 0,500000;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表