Search notes:

SQL*Plus: VARIABLE

variable declares a bind variable (see also here) which then can be used in SQL Statements or (anonymous) PL/SQL blocks.
When declaring a bind variable, its datatype must be stated, otherwise SQL*Plus throws a SP2-0552: Bind variable … not declared. error.
The current value of the bind variable can be shown with print.
variable num number
exec :num := 42
print num
var  last_create_time varchar2(19)
begin
   select
      to_char(max(created), 'yyyy-mm-dd hh24:mi:ss') into :last_create_time
   from
      user_objects;
end;
/

begin
   dbms_output.put_line('Last creation time: ' || :last_create_time);
end;
/

Datatypes

A bind variable can be set to one of the following data types:
There is no date datatype!

See also

Using variables in SQL*Plus.
SQL*Plus

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...', 1741086650, '3.12.76.84', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL-Plus/variable/index(86): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78