SESSION_USER
SESSION_USER specifies the primary authorization ID of the process.
The data type is VARCHAR(128).
If SESSION_USER is referred to in an SQL statement that is executed at a remote DB2® and the primary authorization ID has been translated to a different authorization ID, SESSION_USER specifies the translated authorization ID. For an explanation of authorization ID translation, see DB2 Administration Guide. The value of SESSION_USER in a user-defined function or stored procedure is determined according to the rules in Table 1.
USER can be specified as a synonym for SESSION_USER.
Example: Display
information about tables, views, and aliases that are owned by the
primary authorization ID of the process.
SELECT * FROM SYSIBM.SYSTABLES WHERE CREATOR = SESSION_USER;