SP2-0552: Bind variable "xyz" not declared.

(Doc ID 1009014.6)

Last updated on DECEMBER 07, 2016

Applies to:

PL/SQL - Version and later
SQL*Plus - Version and later
Information in this document applies to any platform.
***Checked for relevance on 28-Nov-2012***


This Note illustrates two scenarios that can result in the "Bind variable ... not declared" error along with an explanation as to why in conjunction to steps on how to resolve this error.

Scenario 1:

SQL> declare
   mgr varchar2(3);
   :mgr := '001';

SP2-0552: Bind variable "MGR" not declared.

Scenario 2:

SQL> declare
   mgr varchar2(5);
   select '002' into mgr from dual;

PL/SQL procedure successfully completed.

Although the above does not produce an error, the following command will when an attempt to display the value of the mgr variable is done.

SQL> print mgr;
SP2-0552: Bind variable "MGR" not declared. 


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms