Quick Reference - SQL Server
Name of the Currently Executing Stored Procedure
¶
Note: This returns NULL if executed outside the context of a stored procedure.
object_name(@@procid)