@@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';

See Also#