Ask a question »

ORA-00942: table or view does not exist

July 2015

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.

ORA-00942: table or view does not exist




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.
For unlimited offline reading, you can download this article for free in PDF format:
Ora-00942-table-or-view-does-not-exist.pdf

See also

In the same category

Published by jak58. - Latest update by Celia Gatward
This document entitled « ORA-00942: table or view does not exist » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.