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.

Share and contribute or get technical support and help at My Digital Life Forums.



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.
Custom Search

New Articles

Incoming Search Terms for the Article

ORA-00942 - ORA-00942: table or view does not exist - ORA 00942 - PL/SQL: ORA-00942: table or view does not exist - oracle Table or view does not exist - ora 942 - ora-00942 error - table or view does not exist - ORA-00942: table or view does not exist - v$session TABLE OR view does not exist - ora-00942 table or view does not exist - SQL Error: ORA-00942: table or view does not exist - Oracle CREATE TABLE IF NOT EXISTS - Oracle table permissions - create table if not exists oracle - ORA-00942 V$session - oracle v$session does not exist - oracle check if table exists - drop table ora-00942 - ora-00942 oracle - oracle error table or view does not exist - oracle table does not exist - "ORA-00942" - 00942 oracle - Table does not exist. ORA-00942: table or view does not exist - oracle V$SESSION ORA-00942 - table or view doesn't exist - ora+00942 - ORA-00942 V$database - ORA-00942 sql - CHECK IF SCHEMA EXIST ORACLE SQL - oracle table not exist - oracle table or view does not exist NHibernate - erwin ora-00942 - ora-00942 error for v$session - all - alter table ORA-00942: table or view does not exist - alter view modify ORA-00942: table or view does not exist - An SQL exception occurred: ORA-00942: table or view does not exist - error ORA-00942 creating table - getting ORA-00942 error when table exists - how to use create table if not exists in oracle - How to check permission on at table in oracle - not exists oracle - object existence in oracle - oracle ora-00942 set permissions - ora-00942 pl/sql - oracle create a table if it doesn't exist - oracle see object permissions - oracle table doesn't exist -