Neoview SQL Reference Manual (R2.4)
USER Function
The USER function returns the user name that you logged in as. If you are logged in as the role,
the role is returned. This function can be used anywhere in the query. The values returned are
string datatype VARCHAR(64).
USER
The USER function is equivalent to the “CURRENT_USER Function” (page 357).
Considerations for USER
The USER function returns the user name in ISO8859-1 encoding on a Neoview platform that
has the ISO88591 or SJIS configuration. It returns the user name in UCS2 encoding on a Neoview
platform that has the Unicode configuration. For more information on using multibyte character
sets, see the Neoview Character Sets Administrator's Guide.
Example of USER
Logon with role of role1.role1 and with an alias of abcd:
>>SELECT CURRENT_ROLE FROM (values(1)) x(a);
(EXPR)
-------------------------
role1.role1
--- 1 row(s) selected.
>>SELECT USER FROM (values(1)) x(a);
(EXPR)
-------------------------
abcd
--- 1 row(s) selected.
474 SQL Functions and Expressions