USERENV function in Oracle

USERENV is an advanced function that the Oracle database supports. It is used to get the information about the current Oracle session. The USERENV function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

 
USERENV (parameter)

Parameters:
parameter: It is used to specify value to return from the current Oracle session.

Example:

USERENV ( 'ENTRYID' )

Output:
0
Explanation:
Here, the ENTRYID is passed as a parameter. It will return the available auditing entry identifier, which is 0 in this case.

Please Share