Returning the Current Connection's Session ID (SPID) : SPID « System Settings « SQL Server / T-SQL Tutorial






4> SELECT @@SPID SPID
5> GO
SPID
------
    51

(1 rows affected)
1>








26.35.SPID
26.35.1.Returning the Current Connection's Session ID (SPID)