Special registers

A special register is a storage area that is defined for an application process by the database manager and is used to store information that can be referenced in SQL statements. A reference to a special register is a reference to a value provided by the current server. If the value is a string, its CCSID is a default CCSID of the current server. The special registers can be referenced as follows:

Read syntax diagramSkip visual syntax diagram>>-+-+-CURRENT DATE------+------+------------------------------><
   | |              (1)  |      |
   | '-CURRENT_DATE------'      |
   +---CURRENT DEBUG MODE-------+
   +---CURRENT DEGREE-----------+
   +-+-CURRENT PATH----------+--+
   | +-CURRENT FUNCTION PATH-+  |
   | |              (1)      |  |
   | '-CURRENT_PATH----------'  |
   +-+-CURRENT SCHEMA-+---------+
   | '-CURRENT_SCHEMA-'         |
   +-+-CURRENT SERVER-+---------+
   | '-CURRENT_SERVER-'         |
   +-+-CURRENT TIME------+------+
   | |              (1)  |      |
   | '-CURRENT_TIME------'      |
   +-+-CURRENT TIMESTAMP------+-+
   | |                   (1)  | |
   | '-CURRENT_TIMESTAMP------' |
   +-+-CURRENT TIMEZONE-+-------+
   | '-CURRENT_TIMEZONE-'       |
   +-+-SESSION_USER-+-----------+
   | '-USER---------'           |
   '---SYSTEM_USER--------------'
 
Notes:
  1. The SQL 2003 Core standard uses the form with the underscore.