MySQL :: インポートとエクスポート

CSVのインポートとエクスポートの備忘録


mysql> LOAD DATA INFILE "/path/to/file.csv"
INTO TABLE tablename FIELDS TERMINATED BY "," LINES TERMINATED BY "\n";


mysql> SELECT * FROM tablename INTO OUTFILE "/path/to/file.csv" FIELDS TERMINATED BY ',';