Switch to: V9V8V7V6V5

User Functions

Current_User_ID ()

Returns ID of the current user if it is running on the server and NULL otherwise.

SELECT Current_User_ID();
=>1

Current_User_Name ()

Returns name of the current user if it is running on the server and NULL otherwise.

SELECT Current_User_Name();
=>'sa'