Welcome  |  Sign In     | 
MSDN
     
Transact-SQL Reference
@@PROCID
Transact-SQL Reference
@@PROCID

Returns the stored procedure identifier (ID) of the current procedure.

Syntax

@@PROCID

Return Types

integer

Examples

This example creates a procedure that uses SELECT to display the @@PROCID setting from inside the procedure.

CREATE PROCEDURE testprocedure AS
SELECT @@PROCID AS 'ProcID'
GO
EXEC testprocedure
GO

See Also

CREATE PROCEDURE

Metadata Functions


©2006 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
 
Page view tracker