CURRENT_USER statement in SQL Server
The CURRENT_USER statement returns the name of the current user in the SQL Server database.
This article will show you in detail how to use the function to handle CURRENT_USER statements in SQL Server with specific syntax and examples to better visualize and capture functions.
Describe
The CURRENT_USER statement returns the name of the current user in the SQL Server database.
Syntax
To use the CURRENT_USER statement in SQL Server, we use the following syntax:
CURRENT_USER
- There are no parameters and arguments in the statement.
Note :
- Do not put parentheses () after CURRENT_USER function.
- See also USER_NAME, SESSION_USER and SYSTEM_USER functions.
- CURRENT_USER can be used in later versions of SQL Server: SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, and SQL Server 2005.
For example
See how to use the CURRENT_USER statement in SQL Server.
SELECT CURRENT_USER;
Result: 'quantrimang'
Previous article: COALESCE command in SQL Server
Next lesson: ISDATE function in SQL Server
Update 25 May 2019
You should read it
- SYSTEM_USER function in SQL Server
- Function SESSION_USER in SQL Server
- USER_NAME function in SQL Server
- CURRENT_TIMESTAMP command in SQL Server
- Check the current user on Linux
- The CREATE USER command in SQL Server
- DROP USER command in SQL Server
- The command changes user in Windows
- How to Publish WEB Server, FTP Server and VPN Server via ADSL?
- NOW function - The function returns the current date and time in Excel
- How to Find the Current User on Windows
- GETDATE function in SQL Server
Maybe you are interested
How to cool the laptop simply and effectively How to recover Apple account password (Apple ID) is extremely simple What is the DPI of the mouse? Concerned about security issues, SpaceX banned employees from using Zoom FAST, the world's largest telescope, begins to look for life in the universe Small but useful technology tips (Part 1)