UID is an advanced function that the Oracle database supports. It is used to get the id number for a user’s session. The UID function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.
SELECT UID INTO test_uid FROM dual;
Here, the variable test_uid will contain the id number for the user’s session after the execution of the above query.