Great article, Steve.
My only quandary is where does the idea of it being preferable to include BEGIN/END come from? Oracle? Portability? To be sure, I never include BEGIN/END in stored procedures mostly because it makes it more difficult to execute a part of the code during troubleshooting under the gun. You have to remember to comment out the BEGIN and then remember to uncomment it when you're done. It doesn't really bring anything to the game unless you know for sure that your code will be migrated to an RDBMS that requires it.
I also realize that it's a "Beginner's" article and so it's not designed to be all encompassing. I was happy to see the beginning of a "Flower Box" but both a more complete one and emphasizing that comments make code so much easier to troubleshoot would be good for beginners to understand.
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair
When you put the right degree of spin on it, the number 318
is also a glyph that describes the nature of a DBAs job. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs