LOAD DATA

LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name'   [IGNORE | REPLACE]   INTO TABLE tbl_name   [PARTITION (partition_name [, partition_name] ...)]   [CHARACTER SET charset]   [field_options] [line_options]   [IGNORE n {LINES | ROWS}]   [(col_or_user_var_name, ...)]   [SET col_name = expr [, col_name = expr] ...]

LOAD DATA reads input records from the file file_name and loads them in bulk into the table tbl_name. This is faster than using a set of INSERT statements. As of MySQL 5.6.2, LOAD DATA supports a PARTITION clause for partitioned tables to indicate the partitions or subpartitions into which to insert rows. In this case, an error occurs if a row would not be inserted in any named partition. ...

Get MySQL, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.