ORA-00942: table or view does not exist
Oracle cannot find the table or view — or it exists but you have no privilege on it. Check the name and the schema prefix, then the privileges. Oracle deliberately shows the same error in both cases.
What it means
To avoid revealing which objects exist, Oracle returns ORA-00942 both when an object is missing and when you are not allowed to see it. So the error does not prove the table is gone. Since Oracle 23ai the message also names the object.
Common causes
- The table is in another schema and the name is not prefixed (
HR.EMPLOYEES) and has no synonym. - Your user has no
SELECT(orREAD) privilege on it. - The name was created in quotes with a different case, or is misspelled.
- Inside a definer’s-rights PL/SQL unit, the privilege comes through a role — roles are not active there, so a direct grant is needed.
- You are connected to a different database, PDB or schema than you think.
How to fix it
- Check that the object exists and who owns it:
SELECT owner, object_type FROM all_objects WHERE object_name = 'EMPLOYEES'(it only shows objects you can see; a DBA can checkDBA_OBJECTS). - Prefix the owner, or create a synonym.
- Ask the owner or a DBA for the privilege:
GRANT SELECT ON hr.employees TO app_user. - For PL/SQL, grant the privilege directly to the procedure owner instead of through a role.
- Confirm where you are connected:
SELECT sys_context('USERENV','CON_NAME'), user FROM dual.
Example
Where does the object live and can I see it?
SELECT owner, object_name, object_type
FROM all_objects
WHERE object_name = 'EMPLOYEES';
Grant directly (needed for definer’s-rights PL/SQL):
GRANT SELECT ON hr.employees TO app_owner;
In SQLlightspeed
When a statement fails, SQLlightspeed’s error panel shows the error code with a plain-language explanation and a suggestion for what to do next, together with Oracle’s own message and a link to Oracle’s documentation — for this error and dozens of other common ones.
Related errors
ORA-01031ORA-00904ORA-01017 All Oracle errors →
Oracle documentation for ORA-00942. Oracle is a registered trademark of Oracle Corporation. SQLlightspeed is not affiliated with Oracle.