The syntax for declaring variables is:
variable_name datatype [CONSTANT] [NOT NULL] [:= | DEFAULT initial_value]
For example:
Declaring a variable:
LDescription varchar2(40);
Declaring a constant:
LTotal constant numeric(8,1) := 8363934.1;
Declaring a variable with an initial value (not a constant):
LType varchar2(10) := ‘Example’;
A literal is the same as a constant. We’ll cover three types of literals – text literals, integer literals, and number literals
SQL: Data Types
The following is a list of general SQL datatypes that may not be supported by all relational databases.
Data Type Syntax
Oracle 9i
Explanation (if applicable)
dec(p, s)
The maximum precision [...]




