在MySQL中导出三张表,可以使用以下步骤:
CREATE TABLE tmp_table AS
SELECT * FROM table1
UNION ALL
SELECT * FROM table2
UNION ALL
SELECT * FROM table3;
SELECT * INTO OUTFILE '/path/to/output/file.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM tmp_table;
/path/to/output/file.csv
替换为你想要导出的CSV文件的路径。导出的CSV文件将包含三张表的数据。请注意,导出数据时可能需要适当的权限。确保你有足够的权限执行上述操作。