我試圖導出一個MySQL表格作爲CSV,但我遇到了麻煩。我已經嘗試了兩種方法,兩種方法都沒有奏效。從MySQL寫入CSV?
第一:
SELECT *
INTO OUTFILE '/path/to/filename.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
FROM table;
二:
mysqldump -u [username] -p -t -T/path/to/directory [database] [table] --fields-enclosed-by=\" --fields-terminated-by=,
第一個有什麼問題? – Devart