// SQLite error reference

SQLITE_ERROR_MISSING_COLLSEQ: no such collation sequence

The SQL, or the schema it touches, uses a collation this connection doesn't have, usually a custom collation registered by another application.

Result code
SQLITE_ERROR_MISSING_COLLSEQ
Name
257
Category
Extended result codes
Error message
no such collation sequence: unicode_ci

What it means

SQLITE_ERROR_MISSING_COLLSEQ (257) means a statement couldn't be prepared because a collating sequence it names isn't registered on this connection. SQLite has three built-in collations, BINARY, NOCASE and RTRIM; anything else must be registered by the application with sqlite3_create_collation(). A database created by an app that registers its own collation can't be fully used by tools that don't.

Common causes

  • The schema declares a column or index with a custom collation, such as one from an ICU extension or an application.
  • The extension that provides the collation isn't loaded in this tool or program.

How to fix it

  1. Find where the collation is used.

    SELECT name, sql FROM sqlite_schema WHERE sql LIKE '%COLLATE%';
  2. Load the extension or register the collation in your program before running the statement.

  3. Or rebuild the affected column or index with a built-in collation if the custom one isn't needed.

    CREATE INDEX idx_users_name ON users(name COLLATE NOCASE);

Related errors

More extended result codes errors

The code and message text are from the SQLite result and error codes documentation. Browse the full SQLite error list or search every database error.

// fewer errors, faster fixes

Work on SQLite in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQLite and the other databases you use.