Here is the solution for most common causes of Oracle SQL ORA-00942: table or view does not exist exception.
Below is the most common example when you got the exception.
SELECT * FROM bual; --it sholud be dual
- You try execute DML/DDL operation on table which does not exists
- You try to SELECT/INSERT/UPDATE/DELETE/ALTER etc… on table which the user does not have permission to
3.1 You try execute DML/DDL operation on table which does not exists
Check your spieling of used table and compare it with the reference table declaration.
Ensure that the table exists in database dictionary. At first start from query:
SELECT * FROM ALL_TABLES WHERE TABLE_NAME = '<YOUR_TABLE_NAME>';
3.2 You try to SELECT/INSERT/UPDATE/DELETE/ALTER etc… on table which the user does not have permission to
If the table exists and the name of the table is the same as the referenced object ensure that the user has permission to SELECT/UPDATE/DELETE etc.. on it.
SELECT * FROM USER_TABLES WHERE TABLE_NAME = '<YOUR_TABLE_NAME>';
You can grant permission to user like below:
GRANT SELECT ON <TABLE_SCHEMA>.<YOUR_TABLE_NAME> TO <USER>;
At the end… May I ask you for something?
If I helped you solve your problem, please share this post. Thanks to this, I will have the opportunity to reach a wider group of readers. Thank You