• Regarding dynamic sql versus paramaterized sql, probably the example you've provided has been simplified for illustration purposes, and this is really an attempt to get a more general answer intended to apply to a variety of similar problems. However, in the real world the answer depends. The most important thing is that you want to examine the execution plan for each case and confirm it's using an indexes efficiently as expected, because one method may result in an index covered query and the other method might not depending on the specifics. If you have something like a generic search procedure that implements a handful or more of optional WHERE clause predicates, then sometimes it makes sense just to return more rows than are needed and then apply additional filtering and sorting on the application side. What I mean is that an indexed seek that returns 10 rows, or even 100 rows, will often times perform better than a table scan that returns 1 row.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho