Bạn có thể chạy một SELECT ... INTO OUTFILE
truy vấn dọc theo các dòng sau:
SELECT * INTO OUTFILE '/path/to/my_table_structure.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'my_table'