PL/SQL Variables
The General Syntax to declare a variable is:
variable_name datatype [NOT NULL := value ];
|
- variable_name is the name of the variable.
- datatype is a valid PL/SQL datatype.
- NOT NULL is an optional specification. When a variable is specified as NOT NULL, you must initialize the variable.
- Each variable declaration must be terminated by a semicolon.
For example:
DECLARE
salary number(4);
dept varchar2(10) NOT NULL := “HR Dept”;
References :