I know that the show user command return: USER is "SCOTT"
But is it possible in a sql query or in a plsql script to only get the username of the current user and store it in a variable?
I know that the show user command return: USER is "SCOTT"
But is it possible in a sql query or in a plsql script to only get the username of the current user and store it in a variable?
The USER
built-in function may be used.
DECLARE
v VARCHAR2(30);
BEGIN
v := USER;
END;
STANDARD.USER()
, which produces a PL/SQL to SQL context switch. Better use this approach instead. –
Jainism SYS_CONTEXT( 'USERENV', 'CURRENT_USER' )
fnd_profile.value('USERNAME')
fnd_profile.value('USER_ID')
fnd_flobal.user_id
these can be used to get the user details
fnd_profile
is not a standard Oracle package. Can you give a link to the Oracle manual? –
Gyve or
SCOTT
© 2022 - 2024 — McMap. All rights reserved.
select user from dual
– Gyve