Stored Procedures—Part 1
Stored procedures—or SPs, as some lovingly call them—are likely to become your best friends as you spend more and more time with SQL Server. It is not uncommon to come across databases that contain hundreds of stored procedures—they’re just so darned flexible! In this chapter, we’ll find out exactly why stored procedures are so useful, and we’ll create a couple of SPs of our own.
What Are Stored Procedures, and Why Should I Use Them?
A stored procedure is a repeatable piece of code. You’d be forgiven for thinking, “Hold everything!”—isn’t that what a function does? Well yes, it is. But a function is intended ...