selecting user in sql code example
Example 1: sql server get users
select * from master.sys.server_principals
Example 2: sql get user account
SELECT CURRENT_USER;
select * from master.sys.server_principals
SELECT CURRENT_USER;