# Catalog Error: The table does not exist in this database

> DuckDB cannot find the named table, view or table function in the catalog of the database you are connected to.

Source: https://sqlly.app/errors/duckdb/catalog-table-not-exist
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).
Note: Quoted error message text belongs to its database vendor.

- Exception: `Catalog Error`
- Category: Catalog Error

Error message:

```text
Catalog Error: Table with name no_such_table does not exist!
```

## What it means

This is DuckDB's missing-object error. The binder looked up the name in the catalog and found nothing with it: no table, no view, no table function. For a missing table the message spells out `Table with name X does not exist!`. A missing table function reports `Table Function with name X does not exist!`.

Because DuckDB is often embedded, the usual cause is not a typo but the wrong database: the application opened a fresh in-memory database, the file path resolved relative to a different working directory, or the query ran on a connection that never created the schema. Lookups are case-insensitive even for names created in double quotes, so a table created as "V07Mixed" is found by SELECT * FROM v07mixed and SELECT * FROM "v07mixed".

## Common causes

- A misspelled table name. Casing does not matter, even for names created with double quotes.
- The query ran against a different database than you think, often a new in-memory one opened by default.
- A table function from an extension that is not loaded, such as `iceberg_scan` with autoloading disabled, does not bind. Built-in functions such as `read_csv_auto` need no extension and fail with an IO error on a missing file, not a catalog error.
- The migration that creates the table never ran on this connection.

## How to fix it

1. List what actually exists in the connected database before rewriting the query:

   ```sql
   SELECT table_schema, table_name, table_type
   FROM information_schema.tables
   ORDER BY 1, 2;
   ```
2. Check which database file the connection opened. An empty catalog usually means the process opened a new or in-memory database:

   ```sql
   SELECT current_database(), database_name, path FROM duckdb_databases();
   ```
3. Qualify the name if the table lives in another attached database:

   ```sql
   SELECT * FROM backup.users LIMIT 5;
   ```
4. Create the table if it should exist, with IF NOT EXISTS so reruns are safe:

   ```sql
   CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, email VARCHAR);
   ```

## Reproduce it safely

```sql
SELECT * FROM no_such_table;   -- Catalog Error: Table with name no_such_table does not exist!
```

## Questions

### The table exists in my file. Why does DuckDB say it does not?

The connection is probably not on that file. Embedded apps often open an unnamed in-memory database by default, and a relative path may have resolved elsewhere. Run SELECT * FROM duckdb_databases() to see the path of what you are connected to.

### Does capitalization matter?

Names are matched case-insensitively, including names created inside double quotes. A name created as "V07Mixed" is found by any casing, quoted or not.

## Related errors

- [`Catalog Error`](https://sqlly.app/errors/duckdb/catalog-table-exists): The table or object already exists
- [`Binder Error`](https://sqlly.app/errors/duckdb/column-not-exist): The column is not in the FROM clause
- [`IO Error`](https://sqlly.app/errors/duckdb/io-file-not-found): A file could not be opened
- [`SQLITE_ERROR`](https://sqlly.app/errors/sqlite/sqlite-error): SQLite: SQL logic error
- [`42P01`](https://sqlly.app/errors/postgresql/42P01): PostgreSQL: relation does not exist
- [`1146`](https://sqlly.app/errors/mysql/1146): MySQL: Table doesn't exist

The code and message text are from the [DuckDB documentation](https://duckdb.org/docs/).
