@@SPID
Returns the session ID of the current user process.
Syntax
@@SPID
Return types
smallint
Example
SELECT @@SPID AS 'ID', SYSTEM_USER AS 'Login Name', USER AS 'User Name';
Returns the session ID of the current user process.
@@SPID
smallint
SELECT @@SPID AS 'ID', SYSTEM_USER AS 'Login Name', USER AS 'User Name';