A literal is the same as a constant. We'll cover three types of literals - text literals, integer literals, and number literals
Text Literals
Text literals are always surrounded by single quotes ('). For example:
- 'Hewlett Packard'
- '28-MAY-03'
Integer Literals
Integer literals can be up to 38 digits. Integer literals can be either positive numbers or negative numbers. If you do not specify a sign, then a positive number is assumed. Here are some examples of valid integer literals:
- 23
- +23
- -23
Number Literals
Number literals can be up to 38 digits. Number literals can be either positive or negative numbers. If you do not specify a sign, then a positive number is assumed. Here are some examples of valid number literals:
- 25
- +25
- -25
- 25e-04
- 25.607