admin 发表于 2013-2-27 21:42:35

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


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 lastvisitinto 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 lastvisitinto 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 lastvisitinto outfile 'd:/50w.date.data.xls'from cdb_membersorder by uid desc limit 0,500000;
页: [1]
查看完整版本: 如何导出Mysql数据库表为xls文件的查询语句