Set-based processing in SQL is very powerful, but sometimes you have to do a little extra work to use it.
By Joe Pluta
I've used various features of SQL for a long time, but the one that has always given me a little trouble is the PREPARE statement. I use it rarely enough that I usually have to remind myself how to do it (and why!). I thought I'd write this article as a way to remind myself and you of how and when to use the PREPARE statement and its close cousins, the EXECUTE and EXECUTE IMMEDIATE statements.