Start of change

CURRENT USER

The CURRENT USER special register specifies the primary authorization ID that is to be used for statement authorization. The data type of the special register is VARCHAR(128).

When multiple authorization IDs have been adopted within a thread, the value of the most recently adopted authorization ID within the thread will be returned.

Example

Find the tables owned by the current statement authorization ID.

   SELECT  TABLE_SCHEMA, TABLE_NAME FROM QSYS2.SYSTABLES
     WHERE TABLE_OWNER = CURRENT USER AND TABLE_TYPE = 'T'
End of change