Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Statements to fetch current username and schema

Re: Statements to fetch current username and schema

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 21 Apr 2004 23:12:28 +0200
Message-ID: <4086e3f7$0$17624$636a15ce@news.free.fr>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US