O'Reilly logo

Sams Teach Yourself Microsoft® SQL Server T-SQL in 10 Minutes, Second Edition by Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 23. Working with Stored Procedures

In this lesson, you learn what stored procedures are, why they are used, and how they are used. You also look at the basic syntax for creating and using them.

Understanding Stored Procedures

Most of the SQL statements we’ve used thus far are simple in that they use a single statement against one or more tables. Not all operations are that simple—often, multiple statements are needed to perform a complete operation. For example, consider the following scenario:

Image To process an order, checks must be made to ensure that items are in stock.

If items are in stock, they need to be reserved so they are not sold ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required