Grammar:
Load data [low_priority] [local]
InFile ' File_path ' [replace] [ignore]
into table table_name [(column_list)]
lines[terminated by ' string ' starting by ' string ']
--------------------------------------------------------------------------------------------------------------- -----------------------------------------
Example:
CREATE TABLE Employee (name varchar (+), Department varchar (+), address varchar (16));
Load data infile ' e:/neeky.txt ' into table Employee;
Summarize:
Local, if local is specified, the file is read by clients on the client's host and sent to the server.
Replace, if you specify replace, the input row replaces the original line, and the previous question is that the table has a primary key. Only the same primary key will make the same row.
Ingore, the same, the same line or not, do not look at all the columns in the row, only look at the primary key. The role of ignore is to turn the error into a warning, not to plug in or plug in.
MySQL Load Data infile