Finding Session Id in MS SQL User's Current Process

In MS SQL, the following query is run to find the Session Id of the logged in user in the current process.

SELECT @@SPID AS 'SessionId'


You May Interest

MS SQL Compiling a Stored Procedure With a Requery

Disadvantages of Using Stored Procedures in MS SQL

General Information List of All Allowed Databases in MS SQL Serve ...

Getting List of All Views in MS SQL Database

What is Log Shipping in SQL Server ?