SQL @@SPID

SQL @@SPID 2

SQL @@SPID is one of the Configuration Functions, which will return the session ID that currently used. Syntax behind this is @@SPID SQL @@SPID Example The below code snippet will show the SP ID and their respective login name that is currently being used by SQL. SELECT @@SPID AS ‘SP ID’, SYSTEM_USER AS ‘Login Name’, USER … Read more