Selecting Database users
The following queries will be returning the user names
Select User
-- This displays the current user
Select User_Name()
Select Current_User
-- This displays the user belongint to ID 2
Select User_Name(2)
-- Displays all users for that DB
Select uid, name from sysusers order by uid
sysusers contain the information of all users
The following queries will be returning the user names
Select User
-- This displays the current user
Select User_Name()
Select Current_User
-- This displays the user belongint to ID 2
Select User_Name(2)
-- Displays all users for that DB
Select uid, name from sysusers order by uid
sysusers contain the information of all users
0 comments:
Post a Comment