MySQL导出查询结果
命令一: 导出excel格式
select * from login_api_cases where apiCode = "1.3" into outfile "D:a.xlsx";
命令二: 导出csv格式
select * from login_api_cases where apiCode = "1.3" into outfile "D:a2.csv" FIELDS TERMINATED BY ',' ;
命令三:带表头导出
select * into outfile "D:a1.xlsx" from
(select '用例编号','用例模块','接口编号','用例名称','是否执行','接口类型','接口','参数','提取值1','提取值名1','提取值2','提取值名2','断言'
union select caseCode,apiType,apiCode,apiName,orNot,Method,Path,Parameter,ExtractValue1,ExtractValue1_Name,ExtractValue2,ExtractValue2_Name,AssertionValue from login_api_cases where apiCode = "1.3")b;
转载请注明出处,商用请征得作者本人同意,谢谢!!!