Data Base Tips/ SQL Commands...

Wednesday, July 27, 2005

Uid function

In Oracle/PLSQL, the uid function returns the id number for a user's session (the user who is currently logged in).

The syntax for the uid function is:

select uid 
from dual;

For example:

select uid 
into parm_uid
from dual;

The variable called parm_uid will now contain the id number for the user's session.  The value could be 25, for example.



Post a Comment

<< Home