CURRENT_REQUEST_ID (Transact-SQL)
Applies to: SQL Server Azure SQL Managed Instance
This function returns the ID of the current request within the current session.
Transact-SQL syntax conventions
Syntax
CURRENT_REQUEST_ID()
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for