PLS-302 When Table Name And Schema Name Are Identical
(Doc ID 567376.1)
Last updated on NOVEMBER 22, 2019
Applies to:PL/SQL - Version 18.104.22.168 and later
Information in this document applies to any platform.
***Checked for relevance 23 Apr 2018***
Attempting to run a SQL statement such as
SELECT scott.scottnr_seq.NEXTVAL into var from dual
in a pl/sql block, where the table and the schema have the same name, raises the error
PLS-00302: component 'SCOTTNR_SEQ' must be declared
The issue can be reproduced at will with the following steps:
scottnr NUMBER (2) NOT NULL,
scott_desc VARCHAR2 (25) NOT NULL,
PRIMARY KEY (scottnr)
CREATE SEQUENCE scott.scottnr_seq
INCREMENT BY 1
START WITH 1
-- MAXVALUE 99999
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document