Special registers

A special register is a storage area that is defined for an application process by 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 CLIENT_ACCTNGCLIENT ACCTNGCURRENT CLIENT_APPLNAMECLIENT APPLNAMECURRENT CLIENT_PROGRAMIDCLIENT PROGRAMIDCURRENT CLIENT_USERIDCLIENT USERIDCURRENT CLIENT_WRKSTNNAMECLIENT WRKSTNNAMECURRENT DATECURRENT_DATE1CURRENT DEBUG MODECURRENT DECFLOAT ROUNDING MODECURRENT DEGREECURRENT IMPLICIT XMLPARSE OPTIONCURRENT PATHCURRENT FUNCTION PATHCURRENT_PATH1CURRENT SCHEMACURRENT_SCHEMA1CURRENT SERVERCURRENT_SERVERCURRENT TEMPORAL SYSTEM_TIMECURRENT TIMECURRENT_TIME1CURRENT TIMESTAMPCURRENT_TIMESTAMP1(6)(integer)CURRENT TIMEZONECURRENT_TIMEZONECURRENT TIME ZONECURRENT USERCURRENT_USER1SESSION_USERUSER1SYSTEM_USER
Notes:
  • 1 The SQL 2003 Core standard uses the form with the underscore.

The value of these special registers, Start of changeexcept for CURRENT TEMPORAL SYSTEM_TIME,End of change cannot be null.