SYSTEM_USER
SYSTEM_USER()
Section titled “SYSTEM_USER()”Example
Section titled “Example”SELECT SYSTEM_USER AS 'CurrentUser';Output
Section titled “Output”CurrentUser-----------saExplanation
Section titled “Explanation”The SYSTEM_USER function in the provided SQL Server query returns the current system user name. In this example, the system user is ‘sa’.
SYSTEM_USER()
Section titled “SYSTEM_USER()”Example
Section titled “Example”SELECT SYSTEM_USER FROM dual;Output
Section titled “Output”'OracleUser'Explanation
Section titled “Explanation”The SYSTEM_USER function returns the current Oracle user name. In this case, ‘OracleUser’ is returned as it is the name of the current user.