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

 

posted @ 2020-05-28 22:31  朱小勇  阅读(729)  评论(0编辑  收藏  举报