USER is an advanced function that the Oracle database supports. It is used to get the user_id from the current Oracle session. The USER function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.
Syntax:
USER
Example:
SELECT USER
INTO test_user_id
FROM dual; |
Explanation:
Here, the variable test_user_id will contain the user_id from the current Oracle session after the execution of the above query.