MySQL INSERT IGNORE INTO
(09-jan-2024)
When you use the INSERT statement to add multiple rows to a table and if an error occurs during the processing, MySQL terminates the statement and returns an error. Consequently, the table remains unchanged with no inserted rows.
The INSERT IGNORE statement allows you to disregard rows containing invalid data that would otherwise trigger an error and insert only rows that contain valid data.
Here's the basic syntax of the INSERT IGNORE statement:
INSERT IGNORE INTO Table1
(field1, field2, field3)
VALUES
('value1', 'value2', 'value3'),
('value1', 'value2', 'value3'),
('value1', 'value2', 'value3')
Nieuwsoverzicht >>