I face this error when I want to execute this block of code in an anonymous pl/sql block:
DECLARE
BEGIN
SELECT last_name INTO v_last FROM employees;
dbms_output.put_line('v_last is :' || v_last );
END;
PLS-00201: identifier must be declared
thanks.
ORA-06550: error causes are: You tried to execute an invalid block of PLSQL code (like a stored procedure or function), but a compilation error occurred.
in your example, you selected a value inside the variable (v_last) that is not declared in your block.
So to correct your block of code, you can rewrite it like this: