CLEAR LOAD ERRORS
On this page
Removes load errors from the information_ table.LOAD DATA . when it runs.
Syntax
CLEAR LOAD ERRORS [ HANDLE string ]Remarks
- 
        CLEAR LOAD ERRORSremoves all records from theinformation_table.schema. LOAD_ DATA_ ERRORS 
- 
        CLEAR LOAD ERRORS [ HANDLE string ]removes records from theinformation_table where theschema. LOAD_ DATA_ ERRORS HANDLEfield matches the string value that you specify.
- 
        This command causes implicit commits. Refer to COMMIT for more information. 
Example
Suppose the INFORMATION_ table contains many records.orders_:
SELECT load_data_line_number, load_data_line, error_messageFROM INFORMATION_SCHEMA.LOAD_DATA_ERRORSWHERE handle = 'orders_errors'ORDER BY load_data_line_number;
+-----------------------+-----------------------------+--------------------------------------------------------------+
| load_data_line_number | load_data_line              | error_message                                                |
+-----------------------+-----------------------------+--------------------------------------------------------------+
|                     2 | 2,138,Pears,{"order-date"}  | Invalid JSON value for column 'order_properties'             |
|                     4 | 4,307,Oranges,\N            | NULL supplied to NOT NULL column 'order_properties' at row 4 |
+-----------------------+-----------------------------+--------------------------------------------------------------+To remove the two records, run the following command.
CLEAR LOAD ERRORS HANDLE 'orders_errors';
Related Topics
Last modified: July 25, 2022