SQL: Avoiding hard-coding T-SQL procedure names within procedure code

added by DotNetKicks
6/4/2018 1:19:15 PM

1 Kicks, 1551 Views

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 ...