找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2304|回复: 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;
回复

使用道具 举报

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

本版积分规则

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