InterSystems SQL Reference
A function that returns the user name of the current user.
takes no arguments and returns the user name (also referred to as the authorization ID) of the current user. The general function does not allow parentheses; the ODBC scalar function can specify or omit the empty parentheses.
Typical uses for USER
are in the SELECT
statement select list or in the WHERE
clause of a query. In designing a report, USER
can be used to print the current user for whom the report is being produced.
The following example returns the current user name:
SELECT USER AS CurrentUser
The following example selects the name and record creation date information for those records created by the current user:
SELECT Name FROM Sample.Person WHERE Name = USER
Content Date/Time: 2019-02-23 01:10:54