Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Statements to fetch current username and schema
"GIMME" <gimme_this_gimme_that_at_yahoo.com> a écrit dans le message de
news:3f12b4fb.0404211120.3b11d6da_at_posting.google.com...
> Question :
>
> 1. Is there a select statment which returns the value of the current schema?
> (I have the statement that changes the current schema, I need the statement
> which returns the value of the current schema.)
select sys_context('USERENV','SCHEMA_NAME') from dual;
>
> Similary,
>
> 2. Is there a select statement which returns the current username?
select sys_context('USERENV','CURRENT_USER') from dual; select user from dual;
<snip>
Regards
Michel Cadot
Received on Wed Apr 21 2004 - 16:12:28 CDT