CURRENT_USER
SQL - Functions
CURRENT_USER
Returns the current user name
1998-04-15
CURRENT_USER
1998-04-15
Inputs
None.
1998-04-15
Outputs
username
The name of the current user.
1998-04-15
Description
The niladic CURRENT_USER function returns a string of type "name"
whose value represents a user name identification.
1998-04-15
Notes
Data type "name" is a non-standard 63-character type for storing
system identifiers.
Usage
Display CURRENT_USER
SELECT CURRENT_USER AS who_am_i;
who_am_i
------------
jose
Compatibility
1998-04-15
SQL92
SQL92 specifies some additional niladic USER functions:
CURRENT_USER / USER
USER is a synonym for CURRENT_USER.
SESSION_USER
The SESSION_USER function returns the SQL-session user name.
SYSTEM_USER
The SYSTEM_USER function returns the database's initial default user.
A niladic USER function returns a SQL_TEXT character string whose
value represents a user name.