Different types of identifiers in a PL/SQL subprogram
We will start with the most common identifier types, namely:
The following identifiers are not used in a PL/SQL subprogram but are used elsewhere:
A subprogram can have a number of identifiers. These can be:
- Parameters
- Local Variables
- Global Variables
- Exceptions
- Subprograms
Identifiers are used in a PL/SQL subprogram to identify variables, constants, cursors, and exceptions.
Identifiers can be classified into four types:
- Variable identifiers
- Constant identifiers
- Cursor identifiers
- Exception identifiers
There are four types of identifiers in a PL/SQL subprogram:
- Local variables
- Parameters
- Procedure names
- Package names
PL/SQL has two types of identifiers:
- Numeric Identifiers
- Alphabetic Identifiers
Numeric Identifiers are used to identify constants, variables, and parameters. Alphabetic identifiers are used to identify subprograms and cursors.
The following identifiers are used in a PL/SQL subprogram:
- Variable names
- Label names
- -Constants
- -Argument names
- Package specifier and body name
Identifiers are used as labels to identify and distinguish variables, constants, cursors, and subprograms.
Types of identifiers in a PL/SQL subprogram:
- Variable: A variable is a symbol that represents data stored in the computer’s memory.
- Constant: A constant is a symbol that represents an unchanging value.
- Cursor: A cursor is an object that points to the current row of data in a result set or table.
- -Subprogram: A subprogram is a set of statements or instructions that can be called from other programs.
The following identifiers can be used in a PL/SQL subprogram:
- VARIABLE: The variable identifier is the most basic type of identifier. It can store data and parameters.
- RECORD: The record identifier is a container that can hold data and other identifiers.
- LABEL: A label is an identifier that has no value, but it is used to identify sections of code.
- PARAMETER: A parameter is an identifier that has a value and it can be passed to a subprogram or function.
- CONSTANT: A constant is an identifier with values that are fixed and cannot be changed during execution of the program.