ORA-00942 Table or View Does Not Exist Oracle Error

Sometime when you compile an object or package or view in Oracle, or execute some PL/SQL statements on Oracle table, or when running an Oracle program or application, the following error my occurs:

ORA-00942: table or view does not exist

The cause or reason for ORA-00942 error message is because of Oracle tries to execute an SQL statement that references a table or view that either does not exist, or because of a synonym that is not allowed here was used, or because of you do not have access rights to the particular object. Other possible cause is that the table or view belongs to another schema and you didn’t reference the table by the schema name, or a view was referenced where a table is required.

Depending on what’s the cause of the problem, there are several resolutions or remedies to resolve this error. And due to several possible reasons that may cause the error, there are several actions or steps that you can take to identify where is the error and take the appropriate workaround or solution.

  1. Check existing user tables and views if they exists in Oracle by querying the data dictionary by executing the following SQL statement:

    select *
    from all_objects
    where object_type in (‘TABLE’,'VIEW’)
    and object_name = ‘OBJECT_NAME‘;

    Replace OBJECT_NAME with the name of the table or view that you want to verify its existence.

    If this error occurred because the table or view does not exist, take the following actions:

    • Check and ensure that the spelling of the table (does not misspell) or view name is correct.
    • Check and ensure that a view is not specified where a table is required.
    • If no such table or view exists, create the table or view, or use another table or view.
  2. If the table or view exists, check and verify if the user has the necessary permissions and rights to read and access (i.e. select) from the table, as certain privileges may be required to access the table. In this case, you will need to have the owner of the table or view, or a Oracle DBA to grant the appropriate privileges, permissions or rights to this object.

    Note that when selecting from a system view (such as v$session) the privilege or access rights to select from the view must be granted to the user directly and not via a role. This is the case if you can select from the view without problem but then get this error when trying to create a view on it.

  3. If the table or view exists but is in a different schema from the current schema where the SQL is executing (in other word, the table doesn’t own by you, but owned by other user), the ORA-00942 error will return too. Resolve this by explicitly reference the table or view by specifying the schema name, i.e. schema_name.table_name.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.

New Articles

Incoming Search Terms for the Article

ORA-00942 - ORA-00942: table or view does not exist - ora-00942 table or view does not exist - oracle table or view does not exist - table or view does not exist - PL/SQL: ORA-00942: table or view does not exist - table or view does not exist in oracle - ora-00942 table or view does not exist oracle - ora-942 - ora 00942 table or view does not exist - ora 00942 - ora 942 - ora-00942 table or view doesn't exist - SQL Error: ORA-00942: table or view does not exist - v$session table or view does not exist - ORA-00942: table or view does not exist - ORA-00942: table or view does not exist - ora-00942 error - v$session ora-00942 - oracle procedure table or view does not exist - table or view does not exist oracle - v session table or view does not exist - "ORA-00942: table or view does not exist" - all - v session table does not exist - oracle permissions table - ORA-00942: table or view does not exis - Table does not exist Oracle - ORA-00942 - oracle table or view does not exists - ora 942 error - oracle table does not exist - Oracle procedure table does not exist - SQL Error: ORA-00942 - Error when opening a DB object: ORA-00942: table or view does not exist - table or view does not exist procedure - "ORA-00942" - table or view does not exits dba - what table or view doesn't exist in oracle - PL/SQL: ORA-00942: table or view does not exist - can you do oracle table export with select access - drop table oracle ORA-00942: table or view does not exist - how to view oracle table permissions - ora 942 during export - 00942 oracle - ADD ORACLE TABLE RIGHTS - ora-00942 Table does not exist - package compilation error oracle : table or view does not exist - export table or view does not exist - ORA--942 -