- Numeric literals
- Non-numeric literals( string literals)
1.PL/SQL Numeric literals:
These can be either integers or floating point numbers. If a float is being represented, then the integer part must be separated from the float part by the period (.).
Integers are 26, 27, 456, -58 etc.
Floats are 6.35, 26E-05, 0.1, +17.2 etc.
2.PL/SQL Non numeric literals:
These are represented by one or more legal characters and must be enclosed within single quotes.
Ex: ‘Hello world’
‘ * ‘
We can represent single quote character itself in a non-numeric literal by writing it twice.
Ex: “Don’t go without saving the program”
PL/SQL will also have literals, which are called as logical (Boolean) literals. These are predetermined constants. The values it can take are TRUE, FALSE, and NULL.
- A comment line begins with a double hyphen (-). In this case the entire line will be treated as a comment.
- The comment line begins with a slash following by an asterisk (/*) till the occurrence of an asterisk followed by a slash (*/). In this case comment lines can be extended to more than one line.
Example-2: /* this takes rows from /* table EMPLOYEE */ and put on another table */