This article is written about how to use the Oracle/PLSQL USER function with syntax and examples.
Description
The Oracle/PLSQL USER function returns the user_id from the modern-day Oracle session.
Syntax
The syntax for the USER function in Oracle/PLSQL is:
USER
Parameters or Arguments
There are no parameters or arguments for the USER function.
Returns
The USER function returns a string value.
Applies To
The USER function can be used in the following versions of Oracle/PLSQL:
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
Example
Let’s seem at some Oracle USER feature examples and discover how to use the USER function in Oracle/PLSQL.
For example:
parm_user_ID := USER;
OR
select USER
into parm_user_ID
from dual;
The variable known as parm_user_ID will now incorporate the Oracle consumer ID from the modern Oracle session.
Leave a Review