I see a lot of developers asking how to get the currently executing Stored Procedure name. This is probably for logging the stored procedures when they are executed.
Here’s a very simple way. I have added comments to explain the code
Observe the built-in object_name(@@procid) function which returns the Stored Procedure name
OUTPUT
No comments:
Post a Comment