Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.09 KB

current-request-id-transact-sql.md

File metadata and controls

40 lines (31 loc) · 1.09 KB
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
CURRENT_REQUEST_ID_TSQL
CURRENT_REQUEST_ID
CURRENT_REQUEST_ID
TSQL

CURRENT_REQUEST_ID (Transact-SQL)

[!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

Syntax

CURRENT_REQUEST_ID()  

Return types

smallint

Remarks

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

See also

@@SPID (Transact-SQL)