Syntax:
LOAD DATA
    [LOW_PRIORITY | CONCURRENT] [LOCAL]
    INFILE 'file_name'
    [REPLACE | IGNORE]
    INTO TABLE tbl_name
    [PARTITION (partition_name [, partition_name] ...)]
    [CHARACTER SET charset_name]
    [{FIELDS | COLUMNS}
        [TERMINATED BY 'string']
        [[OPTIONALLY] ENCLOSED BY 'char']
        [ESCAPED BY 'char']
    ]
    [LINES
        [STARTING BY 'string']
        [TERMINATED BY 'string']
    ]
    [IGNORE number {LINES | ROWS}]
    [(col_name_or_user_var
        [, col_name_or_user_var] ...)]
    [SET col_name={expr | DEFAULT}
        [, col_name={expr | DEFAULT}] ...]

The LOAD DATA statement reads rows from a text file into a table at a
very high speed. The file can be read from the server host or the
client host, depending on whether the LOCAL modifier is given. LOCAL
also affects data interpretation and error handling.

LOAD DATA is the complement of SELECT ... INTO OUTFILE. (See
https://dev.mysql.com/doc/refman/8.4/en/select-into.html.) To write
data from a table to a file, use SELECT ... INTO OUTFILE. To read the
file back into a table, use LOAD DATA. The syntax of the FIELDS and
LINES clauses is the same for both statements.

The mysqlimport utility provides another way to load data files; it
operates by sending a LOAD DATA statement to the server. See
https://dev.mysql.com/doc/refman/8.4/en/mysqlimport.html.

For information about the efficiency of INSERT versus LOAD DATA and
speeding up LOAD DATA, see
https://dev.mysql.com/doc/refman/8.4/en/insert-optimization.html.

URL: https://dev.mysql.com/doc/refman/8.4/en/load-data.html

