How to load data from file into table


If you want to load data into a table from a local file, do as follow:

load data local infile ” into table table_name fields terminated by ” lines terminated by ”;

example:

load data local infile ‘/input/data’ into table TEMPLATE fields terminated by ‘,’ lines terminated by ‘\n’;

Comments are closed.