Mysql通过语句导出excel

1、带标题

select * into outfile ‘E:/20200528222319_weibaojilv.xls‘ from(select ‘序号‘,‘维修时间‘,‘结束时间‘,‘维修花费时间‘,‘维修码‘,‘所属分系统‘,‘所属分系统‘,‘故障名‘,‘维修人员‘,‘维修费用‘,‘备注‘  union select id,time,end_time,use_time_str,fix_code,subsystem,device_name,fault_name,who_take,spend_money,remark from fix_history)b

2、不带标题

select * into outfile ‘E:/catid.xls‘ from 784_note