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

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758198545, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL-Plus/_errors/SP2-0552_Bind-variable-not-declared(70): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78