The USER function in Oracle SQL / PLSQL is used to retrieve the user id of the current Oracle Session.
Syntax for the USER function in Oracle SQL / PLSQL is:
SELECT USER
FROM table_name;
Example:
Using USER function to retrieve the user name for the current session
SELECT USER FROM dual;
Will return the name of the user logged in the current Oracle Session e.g. “System” or “Scott”.