Lexical units include letters, numerals, special characters, tabs, spaces, returns and symbol that building a PL/SQL block. Lexical unit can classified as following…
Identifier: Identifier are the names given to PL/SQL objects.
Quoted Identifier: Quoted identifier makes identifier case sensitive, include character such as space and use reserved words. example-
“begin date” DATE;
“end adte” DATE;
Delimiters: Delimiters are symbols that have special meaning. I know you have already learned about that the semicolon (;) is used to terminate a SQL & PL/SQL statement. Therefore, (;) is the best example of a delimiters. A list of delimiters are following-
|@||Remote access indicator|
|—||Single line Comment ondicator|
|/*||Beginning Comments Indicator|
|*/||Ending Comment Indicator|
Literals: Any value that is assigned to a variable is a literal. Any character, numeral, boolean or date value that is not an identifier is a literal. Literal can classified as -
- Character Literal : Such as – Asgor, 124c, 11-jan-2014
- Numeric Literal : Such as – 51478, 45.457
- Boolean Literal : TRUE, FALSE and NULL is boolean literals.
Comments: It is good programming practice to explain what a piece of a code is trying to achieve. When you include the explanation in a PL/SQL block, the compiler cannot interpret these instruction. Comments are given by the …
– Two hyphen (–) are used to single line comment.
– The beginning and ending comments delimiters (/* and */) are used to comments multiple lines.