Top

Name

username — returns the login name of the current user

Synopsis

username ( );
 

Description

Returns the login name of the user of the connection. Selecting user is equivalent.

Parameters

None

Return Values

A string containing the login name of current user

Examples

Example 24.432. Get current DB user

SQL> select username();
callret
VARCHAR
_______________________________________________________________________________

dba

1 Rows. -- 5 msec.
SQL> select user;
callret
VARCHAR
_______________________________________________________________________________

dba

1 Rows. -- 4 msec.