根据查询语句,导出数据至指定文件
SELECT name INTO OUTFILE '/tmp/result.txt' FIELDS TERMINATED BY '-|-' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '
' FROM table_name;
FIELDS TERMINATED BY 表示指定字段分隔符
OPTIONALLY ENCLOSED BY 表示指定字段包围符号
LINES TERMINATED BY 表示指定行与行分隔符