| Previous | Next |
| SQLITE_E_IOERR_UNLOCK | SQLITE_E_IOERR_RDLOCK |
SQLITE_E_CONSTRAINT_UNIQUE
SQLITE_E_CONSTRAINT_UNIQUE corresponds to SQLITE_CONSTRAINT_UNIQUE: an INSERT or UPDATE would create duplicate values in a UNIQUE index or constraint.
What to check
- Identify the specific unique index from the error message or schema; a table can have several UNIQUE constraints.
- Check normalization, case folding, collation, and concurrent inserts before defining a conflict policy.
- Use an UPSERT only when updating the existing logical row is the intended business operation.
SELECT name, sql FROM sqlite_master WHERE type = 'index' AND sql IS NOT NULL;
SQLite: SQLITE_CONSTRAINT_UNIQUE
Looking for a different code? Search another status or error code.