DB2 SQL GLOBAL VARIABLES

GLOBAL VARIABLES

  1. GLOBAL VARIABLES are database objects to save a single value at a time(like DTAARA object)
  2. They can be accessed and modified using SQL statements.
  3. Their definition (only definition, not actual value) is stored in the database catalogs.
  4. The reason for this is that global variables have a session scope.
  5. This means that every session can use the GLOBAL VARIABLES that exist in the catalogs, but each session has its own private value that it can manipulate and…