一、需求
从mysql数据库中导出相关数据,并以xls的格式保存
二、方法
select * into  outfile '/home/liu/lys1.xls' from TextAlarmResult where  projectTaskName='20111122124721';
SELECT lastAlarmTime,pageUrl,hitKeyWords, t.domainName as domainName,d.ips as ip,projectTaskName,c.cityName into outfile ''     FROM TextAlarmResult as t     LEFT JOIN DomainName as d ON domainNameKey = d.domainNameID   
    left join City as c on c.cityCode = t.areaCode    
where isChecked =0  and alarmLevel !=0 and projectTaskName = '20110128225614' and t.areaCode !='000000'
order by textAlarmResultId desc
本文出自 “ ” 博客,请务必保留此出处