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
You can load data from a csv or text file. If you have a text file with records from a table, you can load those records within the table. For example if you have a text file, where each row is a record with the values for each column, you can load the records this way.
id //field 1
name //field2
1,peter
2,daniel
...
--example on windows
LOAD DATA LOCAL INFILE 'C:\\directory_example\\table.txt'
INTO TABLE Table
CHARACTER SET UTF8
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n';