Site icon Database Tutorials

@@SPID Function in SQL Server(TSQL)

 

With the @@ SPID Function, we can find the session id of the current session. Usually we use when we want to exclude the current session in our queries.

Sample Uses are as follows:

Current Queries Running On SQL Server Without This Session:

Exit mobile version