Oracle Error 00942: Table or View Does Not Exist
ORA-00942: table or view does not exist
What is Oracle Error 00942?
Oracle ORA-00942 occurs when a SQL statement references a table or view that does not exist in the current schema, or the current user lacks SELECT privilege on an object in another schema.
Common Causes
- 1
Table does not exist in any accessible schema
- 2
Table exists in another user's schema without a synonym or SELECT grant
- 3
Querying with wrong schema prefix: user.table_name
- 4
Typo in the table name (Oracle table names are uppercase by default)
- 5
Missing privilege: SELECT not granted to current user
- 6
View references a table that was dropped
Step-by-Step Solutions
Check if table exists: SELECT * FROM all_tables WHERE table_name = UPPER('tablename');
Find which schema owns it: SELECT owner, table_name FROM all_tables WHERE table_name = UPPER('tablename');
Use fully qualified name: SELECT * FROM schema_owner.table_name;
Grant access: GRANT SELECT ON schema_owner.table_name TO current_user;
Create synonym: CREATE SYNONYM table_name FOR schema_owner.table_name;
Prevention Tips
Create PUBLIC or private synonyms for frequently accessed cross-schema objects
Grant appropriate SELECT privileges with GRANT...TO
Standardize schema naming conventions across the team
Use ALL_TABLES, ALL_VIEWS, ALL_SYNONYMS data dictionary views to navigate object ownership
Frequently Asked Questions
How do I find which schema owns a table in Oracle?
What is a synonym in Oracle and when do you use it?
Related Errors
Still Stuck?
Ask our AI SQL Assistant or the community — get answers in seconds.