no such table SQL Origin: Data OSI layer 7 · Application Last updated 18 Nov 2026

SQLite: no such table: X

The SQL refers to a table that doesn't exist in the database file you opened.

Exact message you may see no such tablesqlite3.OperationalError: no such tableSQLITE_ERROR: no such tableSQLite no such table usersError: SQLITE_ERROR: no such table
Seen on: SQLite Python Node.js

Meaning

Usually the wrong database file (relative path, new empty file created silently), migrations not run, a typo/case difference in the name, or a table living in an attached database/schema (main.t, other.t). Check .tables and the file path your app actually uses.

Common causes

  • Wrong or empty database file (created silently)
  • Migrations not applied
  • Typo in the table name
  • Table in an attached database
  • Using a temp table after the connection closed

⚡ Quick fix

  1. Run .tables / SELECT name FROM sqlite_master
  2. Use an absolute path to the .db file
  3. Apply migrations before queries

Detailed fix by platform

Shell

  1. sql
    sqlite3 app.db ".tables"
    sqlite3 app.db "SELECT name FROM sqlite_master WHERE type='table';"

How to diagnose

  1. File — Right path?
  2. Migrations — Applied?
  3. Name — Exact?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

208 — SQL Server: Invalid object name 'x'. (Msg 208) (SQL)208collation — SQLite: no such collation sequence: X (SQL)collationno column — SQLite: table X has no column named Y (SQL)no columnno such function — SQLite: no such function: X (SQL)no such functionreadonly database — sqlite3.OperationalError: attempt to write a readonly database (SQL)readonly databaseSQLite no such column — sqlite3.OperationalError: no such column: x (SQL)SQLite no such columntransaction — SQLite: cannot start a transaction within a transaction (SQL)transactionunable to open database — sqlite3.OperationalError: unable to open database file (SQL)unable to open databa…no such t…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.