- Variables must be declared first before the usage. The PL/SQL variables can be a scalar type such as DATE, NUMBER, VARCHAR(2), DATE, BOOLEAN, LONG and CHAR, or a composite type, such array type VARRAY.
- Only TRUE and FALSE can be assigned to BOOLEAN type of variables.
- AND, OR, NOT operators can be used to connect BOOLEAN values.
- % TYPE attribute can be used to define a variable which is of type the same as a database column's type definition.
- Users can customize the variable types by using TYPE ... IS ... statement.
TYPE v_arr IS VARRAY(25) of NUMBER(3);
v1(2) := 3;
DBMS_OUTPUT.PUT_LINE('The Value of v1(2) = ' || v1(2));
v_empno := 4;