Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » System FunctionsRSS Feeds

CURRENT_USER Function

Posted By: Sarita Patel     Category: SQL Server     Views: 1563

This article explains about CURRENT_USER function in sql server with examples.

CURRENT_USER function returns current user name. It is equivalent to USER() function.

It is a nondeterministic i.e It returns different value every time it is called with a specific set of values.



Syntax of COALESCE Function :

CURRENT_USER

Return type of above function is a sysname.




Examples of CURRENT_USER Function :

Example 1 : Use of CURRENT_USER function in select clause 

SELECT CURRENT_USER

Output
dbo

Above example returns current user's database username.
  
Share: 

 
 

Didn't find what you were looking for? Find more on CURRENT_USER Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of CURRENT_USER Function is from United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!