@@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:

dbtut
Author: dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *