IGNORE
You are viewing an old version of this article. View
the current version here.
The IGNORE
option tells the server to ignore some common errors.
IGNORE
can be used with the following statements:
The logic used are:
- Variables out of ranges are replaced with the maximum/minimum value.
SQL_MODE
'sSTRICT_TRANS_TABLES
,STRICT_ALL_TABLES
,NO_ZERO_IN_DATE
,NO_ZERO_DATE
are ignored.- Inserting
NULL
in aNOT NULL
field will insert 0 (numerical field), 0000-00-00 (date field) or empty string (character field). - Rows that causes a duplicate key error or break a foreign key constraint are not inserted/updated/deleted.
The following errors are ignored:
Error number | Symbolic error name | Description |
---|---|---|
1022 | ER_DUP_KEY | Can't write; duplicate key in table 'xxx'" |
1048 | ER_BAD_NULL_ERROR | Column 'xxx' cannot be null |
1242 | ER_SUBQUERY_NO_1_ROW | Subquery returns more than 1 row |
1264 | ER_WARN_DATA_OUT_OF_RANGE | Out of range value for column 'xxx' |
1265 | WARN_DATA_TRUNCATED | Data truncated for column 'xxx' |
1292 | ER_TRUNCATED_WRONG_VALUE | Incorrect date value: 'xxx' |
1366 | ER_TRUNCATED_WRONG_VALUE_FOR_FIELD | Incorrect integer value |
1369 | ER_VIEW_CHECK_FAILED | CHECK OPTION failed 'xxx' |
1451 | ER_ROW_IS_REFERENCED_2 | Cannot delete or update a parent row |
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.