Helper procedure to dynamically execute list of statements

,

I try to avoid dynamic SQL as much as possible and consider it as a necessary evil. However, in some cases, dynamic SQL is the only way. Often, especially while wringing maintenance script, we prepare dynamic scripts that we need to execute statement by statement. In this post, I will provide a simple helper procedure that encapsulates the logic of looping and executing such a script.

Rate

Share

Share

Rate