SESSION_USER
SESSION_USER is a system function in SQL that returns the name of the user account under which the current database session is running. It takes no arguments and returns a string.
SESSION_USER()
Example
Output
Explanation
The SESSION_USER
is a system information function in PostgreSQL. It returns the name of the current user executing the query. In the given example, it returns ‘postgres’ as currently the query is executed through this user.
SESSION_USER()
Example
Output
Explanation
The SESSION_USER
function returns the user name of the current SQL Server session. In this example, your_user_name
is the name of the current user.
SESSION_USER
Example
Output
Explanation
In the given example, SESSION_USER
is a function that returns the name of the currently authenticated user. The DUAL
is a special one-row and one-column table present by default in all Oracle databases.