| title | CURRENT_REQUEST_ID (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 07/24/2017 | ||
| ms.prod | sql | ||
| ms.prod_service | sql-database | ||
| ms.reviewer | |||
| ms.technology | t-sql | ||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 949f6e5f-bf5f-49d6-a763-c443d1d51fe2 | ||
| author | MikeRayMSFT | ||
| ms.author | mikeray |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]
This function returns the ID of the current request within the current session.
Transact-SQL Syntax Conventions
CURRENT_REQUEST_ID() smallint
To find exact information about the current session, use @@SPID. For exact information about the current request, use CURRENT_REQUEST_ID().