SQLITE_NOTFOUND
SQLiteERRORNotableNot Foundofficial confidence

Unknown opcode or table/row not found

Production Risk

Low — mostly internal to extension code.

What this means

SQLITE_NOTFOUND (12) is used internally by SQLite and by virtual table implementations. In user-facing contexts it appears when sqlite3_vtab_on_conflict() is called outside a conflict handler, or when a requested table or element is not found by an extension.

Why it happens
  1. 1Virtual table xUpdate method could not locate a row.
  2. 2sqlite3_vtab_on_conflict() called outside of an ON CONFLICT handler.
  3. 3Extension or custom VFS reporting a missing resource.
How to reproduce

Virtual table implementations and some SQLite C extension APIs.

trigger — this will error
trigger — this will error
-- SQLITE_NOTFOUND is rarely exposed to SQL users directly
-- Typically seen in C extension code:
-- if (sqlite3_vtab_on_conflict(db) == SQLITE_NOTFOUND) { ... }

expected output

Surfaced as OperationalError in drivers when a virtual table cannot locate a row.

Fix 1

Fix 2

Sources

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All SQLite errors