# SQL Server: Invalid object name 'x'. (Msg 208)

**Code:** `208` · **Category:** SQL · **Seen on:** SQL

The table/view doesn’t exist in the current database or schema.

## Meaning

Wrong database context (USE), missing schema prefix (dbo vs custom), case-sensitive collation, or migrations not run.

## Common causes

- Connected to the wrong database (default is master)
- Schema prefix missing
- Migrations not applied
- Temp table out of scope

## Quick fix

1. Specify the database (Initial Catalog)
2. Use schema-qualified names (dbo.Orders)
3. Run migrations

## Detailed fix by platform

### SQL

1. `SELECT DB_NAME(); SELECT * FROM dbo.Orders;`

## How to diagnose

1. **Database** — Current context?
2. **Schema** — Which schema owns it?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/sql/mssql-invalid-object-name-208)
