CURRENT_REQUEST_ID (Transact-SQL)

CURRENT_REQUEST_ID (Transact-SQL)

 

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Returns the ID of the current request within the current session.

Topic link icon Transact-SQL Syntax Conventions

  
CURRENT_REQUEST_ID()  

smallint

To find exact information about the current session and current request, use @@SPID and CURRENT_REQUEST_ID(), respectively.

@@SPID (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft