SQLzoo.net

Who am I - what is my user id?

SQL Server
Find the user name or user id.
The SQL standard permits the function USER


Specific to SQL Server
When you are in a database that you own the answer is dbo (database owner). If you USE someone else's database then you get a user id. (the machine being used to connect to MySQL).

Related links:

  • USERS