Sunday, November 4, 2007

[mssql] Get Login Name

DECLARE @cLogin varchar(25)     --> declare variable
SELECT @cLogin = suser_sname() --> store to variable
SELECT @cLogin AS login_name --> show result

No comments:

Post a Comment