| description | CURRENT_REQUEST_ID (Transact-SQL) | ||
|---|---|---|---|
| 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 | reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 949f6e5f-bf5f-49d6-a763-c443d1d51fe2 | ||
| author | markingmyname | ||
| ms.author | maghan |
[!INCLUDE SQL Server Azure SQL Managed Instance]
This function returns the ID of the current request within the current session.
Transact-SQL Syntax Conventions
CURRENT_REQUEST_ID()
[!INCLUDEsql-server-tsql-previous-offline-documentation]
smallint
To find exact information about the current session, use @@SPID. For exact information about the current request, use CURRENT_REQUEST_ID().