title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CURRENT_REQUEST_ID (Transact-SQL) |
CURRENT_REQUEST_ID (Transact-SQL) |
markingmyname |
maghan |
07/24/2017 |
sql |
t-sql |
reference |
|
|
|
[!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().