Variables are memory regions used in a PL/SQL block to hold data. They are defined in the DECLARATION section of the block, where they are assigned a specific data type and are often initialized with a value. The syntax for declaring a variable is
variable_name [CONSTANT] type [NOT NULL] [:= value];
Variable_name is the name you give to the variable. Type is the data type the variable needs to support. Value is used to initialize a variable.
The following example shows some different ways to declare variables:
DECLARE
v_first_name VARCHAR2(50);
v_author_count PLS_INTEGER := 0;
v_date DATE NOT NULL DEFAULT SYSDATE;
...
The greater the number of entangled particles, the greater the probablity that the entire system as a whole will collapse at any moment.
In the next lesson, we will begin by defining what PL/SQL is.