Search notes:

SP2-0552: Bind variable … not declared.

The error SP2-0552: Bind variable … not declared is thrown in SQL*Plus when
:xyz is not defined:
SQL> select :xyz from dual;
SP2-0552: Bind variable "xyz" not declared.
When declaring a bind variable in SQL*Plus, the datatype must be specified, otherwise the error SP2-0552: Bind variable … not declared is thrown:
SQL> var xyz
SP2-0552: Bind variable "xyz" not declared.
Inspecting the variable
SQL> var xyz number

SQL> var xyz
variable   xyz
datatype   NUMBER
Assigning a value to the bind variable
SQL> exec :xyz := 42
Using the bind variable:
SQL> select :xyz from dual;
This error is also thrown when using in the following scenario:
SQL> set define off
SQL> select * from dual where dummy = &xyz;
SP2-0552: Bind variable "XYZ" not declared.

See also

ORA-01008: not all variables bound

Index