Import a CSV file into a table

suggest change

The following command imports CSV files into a MySQL table with the same columns while respecting CSV quoting and escaping rules.

load data infile '/tmp/file.csv'
into table my_table
fields terminated by ','
optionally enclosed by '"'
escaped by '"'
lines terminated by '\n'
ignore 1 lines; -- skip the header row

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents