Chapter 28. Creating and Managing Stored Procedures in SQL Server

by Ray Rankins


  • Advantages of Stored Procedures

  • Creating and Executing Stored Procedures

  • Deferred Name Resolution

  • Viewing and Modifying Stored Procedures

  • Using Input Parameters

  • Using Output Parameters

  • Returning Procedure Status

  • Cursors in Stored Procedures

  • Nested Stored Procedures

  • Using Temporary Tables in Stored Procedures

  • Using the table Datatype

  • Remote Stored Procedures

  • Debugging Stored Procedures with Query Analyzer

  • Debugging with Microsoft Visual Studio and Visual Basic

  • System Stored Procedures

  • Stored-Procedure Performance

  • Using Dynamic SQL in Stored Procedures

  • Autostart Procedures

  • Extended Stored Procedures

  • Stored Procedure Coding Guidelines and Limitations

A stored procedure is one or more SQL commands stored in a database as an executable object. Stored procedures can be called interactively, from within client application code, from within other stored procedures, and from within triggers. Par-ameters can be passed to and returned from stored procedures to increase their usefulness and flexibility. A stored procedure can also return a number of resultsets and a status code.

    Part III: SQL Server Administration
    Part IV: Transact-SQL
    Part V: SQL Server Internals and Performance Tuning
    Part VI: Additional SQL Server Features