Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Mathias Wulff edited this pageDec 15, 2025 ·1 revision

KeywordIGNORE

TheIGNORE keyword is used to skip errors that occur during data manipulation operations.

INSERT IGNORE

When usingINSERT IGNORE, rows that cause unique constraint violations (like duplicate primary keys) are skipped instead of throwing an error.

Syntax:

INSERT IGNORE INTO table ...

Example:

CREATETABLEcities (name STRINGPRIMARY KEY, populationINT);INSERT INTO citiesVALUES ('Paris',2200000);-- This would normally throw an error due to duplicate key 'Paris'-- With IGNORE, it simply skips this row and continuesINSERT IGNORE INTO citiesVALUES ('Paris',2300000), ('London',8900000);-- Result: 'Paris' keeps original value, 'London' is added

See also:INSERT

© 2014-2026,Andrey Gershun &Mathias Rangel Wulff

Please help improve the documentation by opening a PR on thewiki repo

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp