Creating Stored Procedures

The actual creation of a stored procedure is quite easy. The work that happens before you actually create the procedure is difficult. Before you create the procedure, you must first create and debug the query that is executed inside the procedure. The first part of this might be to create pseudocode that outlines the functionality contained in the stored procedure you are creating. This pseudocode will act as a roadmap during creation of the query.

The query can be as complex or as simple as you need. In this chapter, the stored procedures you will create are simple SELECT statements. Users who are experienced with the SELECT statement, logical operators, comparison operators, and Boolean expressions will want to ...

Get Writing Stored Procedures for Microsoft SQL Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.