I am importing some data of 20000 rows from a CSV file into Mysql.
Columns in the CSV are in a different order than MySQL table\'s columns. How to automatically assi
let suppose you are using xampp and phpmyadmin
you have file name 'ratings.txt' table name 'ratings' and database name 'movies'
if your xampp is installed in "C:\xampp\"
copy your "ratings.txt" file in "C:\xampp\mysql\data\movies" folder
LOAD DATA INFILE 'ratings.txt' INTO TABLE ratings FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES;
Hope this can help you to omit your error if you are doing this on localhost