OracleORA-00942

ORA-00942: Table or View Does Not Exist

ORA-00942 is thrown by Oracle when the query references a table or view that does not exist in the current schema, or when the current user lacks SELECT privilege on an object owned by another schema.

Example Query

SELECT * FROM employees;
-- Fails if EMPLOYEES does not exist in your schema
-- or you need HR.EMPLOYEES

Common Causes

  1. 1Table belongs to a different schema and the schema prefix is missing
  2. 2Current user has not been granted SELECT privilege on the object
  3. 3Table name is misspelled (Oracle stores names in uppercase by default)

How to Fix It

Qualify the table name with the schema: SELECT * FROM hr.employees. Grant privileges: GRANT SELECT ON hr.employees TO your_user. Search for the object with SELECT owner, object_name FROM all_objects WHERE object_name = 'EMPLOYEES'.

Need a reliable database?

Try Supabase — free PostgreSQL with a generous free tier. No credit card required.

Get started free →

Got a query causing this error?

Paste it into SQLbuddy and get an instant plain-English explanation with optimization tips.

Analyze My Query →