| title | CURRENT_REQUEST_ID (Transact-SQL) | ||
|---|---|---|---|
| description | CURRENT_REQUEST_ID (Transact-SQL) | ||
| author | markingmyname | ||
| ms.author | maghan | ||
| ms.date | 07/24/2017 | ||
| ms.service | sql | ||
| ms.subservice | t-sql | ||
| ms.topic | reference | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| dev_langs |
|
[!INCLUDE SQL Server Azure SQL Managed Instance]
This function returns the ID of the current request within the current session.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: 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().