I got ” PLS-00302: component “string” must be declared ” error in Oracle database.
PLS-00302: component “string” must be declared
Details of error are as follows.
PLS-00302: component "string" must be declared Cause: In a reference to a component (for example, in the name "A.B", "B" is a component of "A"), the component has not been declared. The component might be misspelled, its declaration might be faulty, or the declaration might be placed incorrectly in the block structure. Action: Check the spelling and declaration of the component. Also confirm that the declaration is placed correctly in the block structure.
component “string” must be declared
This PLS-00302 errors are related with the reference to a component (for example, in the name “A.B”, “B” is a component of “A”), the component has not been declared. The component might be misspelled, its declaration
might be faulty, or the declaration might be placed incorrectly in the block structure.
To solve this error, Check the spelling and declaration of the component. Also confirm that the declaration is placed correctly in the block structure.
Check the related object if it is valid or invalid.
select status from dba_objects where object_name = 'MEHMET';
If it is INVALID, compile it as follows.
alter package MEHMET compile;
If package, function, procedure, and triggers are not declared and used in PL/SQL code, exceptions would be thrown. Add a member function, procedure, or trigger definition if it is absent or the declaration isn’t available.
If the spelling of a object’s name is incorrect, fix it.
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )