Basically in Oracle SQL / PLSQL a literal is same as constant.
Let’s see few types of literals.
- Text Literals
- Integer Literals
- Number Literals
Text Literals:-
Text literals in oracle plsql are always surrounded by single quotes (‘) e.g.
‘tech honey’
‘oracle’
‘plsql’
‘January 1, 2012’
Integer Literals:
Integer Literals in oracle plsql can be up to 38 digits long, they can be either positive or negative numbers. If no sign is specified then oracle plsql assume the literal to be positive. Some examples of Integer literals are:
20
+20
-20
Number Literals:
Number Literals in oracle plsql can be up to 38 digits long, they can be either positive or negative numbers. If no sign is specified then oracle plsql assume the literal to be positive. Some examples of Number literals are:
20
+20
-20
20e-4
20.0020