Logo 
Search:

SQL Server Articles

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

SUSER_SID Function

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

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

SUSER_SID returns the security identification number (SID) for the specified user's login name.

SUSER_SID can be used as a DEFAULT constraint in either ALTER TABLE or CREATE TABLE.



Syntax of SUSER_SID Function :

SUSER_SID ( [ 'login' ] )

login is a user's login name. It is a sysname. It is an optional. If you don't specify then it returns information about current user. 

Return type of SUSER_SID is a varbinary(85).




Examples of SUSER_SID Function :

Example 1 : Use of SUSER_SID function in select clause 

SELECT SUSER_SID ('NorthwindUser')

Output
0x0105000000000005150000007D3F02A2B97927CFBCECB55FE8030000

Above example returns security id number for specified user's login name.
  
Share: 

 
 

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

Sarita Patel
Sarita Patel author of SUSER_SID 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!