Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PLS-00201: identifier 'CUSTOMERS.CUSTOMER_ID' must be declared.

923806Mar 14 2012 — edited Mar 14 2012
I got the Learn Oracle from Oracle book and been following few of the steps in order to learn Oracle.
I wrote the next sintax in PL/SQL, and got an error message. Do you know how to declare the 'CUSTOMERS.CUSTOMER_ID' ?

SQL> CREATE PROCEDURE new_cust
2 (p_id IN customers.customer_id%TYPE
3 , p_lastname IN customers.cust_last_name%TYPE
4 , p_fisrtname IN customers.cust_first_name%TYPE)
5 IS
6 BEGIN
7 INSERT INTO customers
8 (customer_id, cust_last_name, cust_first_name)
9 VALUES
10 (p_id, p_lastname, p_firstname);
11 COMMIT;
12 END new_cust;
13 /

Advertencia: Procedimiento creado con errores de compilación.

SQL> SHOW ERROR
Errors para PROCEDURE NEW_CUST:

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0 PL/SQL: Compilation unit analysis terminated
2/10 PLS-00201: identifier 'CUSTOMERS.CUSTOMER_ID' must be declared

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 11 2012
Added on Mar 14 2012
10 comments
2,102 views