ORA-00942: table or view does not exist

May 2017

Does ORA-00942 table or view not exist in Oracle? No problem, here is a quick solution to it. This error may be because an unauthorised synonym or any expression is used instead of a table name. One must verify the following conditions before troubleshooting queries. Name of the view and tables used in Oracle with different table names can also show an error message. The table exists because of the table name view in Oracle. There are some special privileges which are granted to users so the database administrator can be contacted later. The below article will illustrate reasons and solutions for viewing a table if it doesn't exist in Oracle.


Issue


If you encounter the following error message: a table or view entered does not exist, or unauthorised synonym was used, or an expression of view was used instead of a table name.

Solution

  • You must verify the following items:
    • the name of the view or the tables used
    • that name of a view is used instead of a table name
    • the name of the view or the table exists.
  • To verify the existence of view, table or synonym:


SELECT * FROM DBA_TABLES WHERE TABLE_NAME = 'table_name';    

SELECT * FROM DBA_SYNONYM WHERE SYNONYM_NAME = 'synonym_name';    

SELECT * FROM DBA_VIEWS WHERE VIEW_NAME = 'view_name';    

Note that


In the case that the table needs to be created or if user or application privileges are needed to access the table, please contact the database Administrator.

Related


Published by jak58. Latest update on March 15, 2012 at 05:38 PM by Celia Gatward.
This document, titled "ORA-00942: table or view does not exist," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).