SQL Server: Get current user without domain

Viewed 26544

I know I can use SELECT SUSER_SNAME() to get the current user name. But in an AD environment I would get the user including domain (e.g. "MyDomain\User").

Is there any function to just receive the username excluding domain?

2 Answers
Related