MySQL LOAD DATA INFILE statement allows to import data into table. This statement facilitates to import data of several formats like csv data, Microsoft Excel file, text file and other delimited text files wide array of options that make this feature so powerful. The following is an example to import csv data into MySQL table:
LOAD DATA LOCAL INFILE authorlist.xls' INTO TABLE authors
FIELDS TERMINATED BY '\t' ENCLOSED BY '\''
ESCAPED BY '\\' LINES TERMINATED BY '\n';
The target table, namely authors, should consists of same list of fields as in excel file.