【MySQL】CSVファイルをインポートするコマンド

More than 1 year has passed since last update.
# TERMINATED BY 区切り文字
# ENCLOSED BY 囲み文字
LOAD DATA LOCAL INFILE '/tmp/import.csv' INTO TABLE table_name FIELDS TERMINATED BY ',' ENCLOSED BY '"'
# データを入れるカラムを指定
LOAD DATA LOCAL INFILE '/tmp/import.csv' INTO TABLE table_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' (column1, column2)
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.