India: +91-4446 311 234 US: +1-6502 652 492 Whatsapp: +91-7530 088 009
Upto 20% Scholarship On Live Online Classes

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:

  1. Parameters
  2. Local Variables
  3. Global Variables
  4. Exceptions
  5. Subprograms

 

Identifiers are used in a PL/SQL subprogram to identify variables, constants, cursors, and exceptions.

Identifiers can be classified into four types:

  1.  Variable identifiers
  2.  Constant identifiers
  3. Cursor identifiers
  4.  Exception identifiers

There are four types of identifiers in a PL/SQL subprogram:

  1. Local variables
  2. Parameters
  3. Procedure names
  4. Package names

PL/SQL has two types of identifiers:

  1. Numeric Identifiers
  2. 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:

  1. Variable names
  2.  Label names
  3. -Constants
  4. -Argument names
  5. 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.