SQL: Avoiding hard-coding T-SQL procedure names within procedure code
When developers are creating SQL Server stored procedures in T-SQL, I often see them embedding the name of the procedure as a hard-coded string within the procedure itself. Here’s a rough example:

The problem here is that if the procedure gets renamed, you then need to go and find every reference to it throughout the code.
The solution is to get the procedure name programmatically and use that:

2018-06-04

