DB2 Version 9.7 for Linux, UNIX, and Windows

USER special register

The USER special register specifies the run-time authorization ID that is used for the current session. The data type of the register is VARCHAR(128). If the length of the authorization ID is less than 8 bytes, the special register value is padded with trailing blanks such that the length is 8 bytes.

USER is a synonym for the SESSION_USER special register. SESSION_USER is the preferred spelling.

Example: Select all notes from the IN_TRAY table that were placed there by the user.
   SELECT * FROM IN_TRAY
     WHERE SOURCE = USER