Chapter 6. Creating More Complex Stored Procedures

IN THIS CHAPTER

Now that you have seen how to create some simple stored procedures using the SELECT statement, there are things that you should know to assist you in creating more powerful stored procedures. These include returning information and error messages that are useful to the user.

In this chapter, I will cover the following points:

  • Creating more complex stored procedures

  • Passing values as parameters into stored procedures

  • Exiting stored procedures using the RETURN keyword

  • Returning data using OUTPUT variables

  • Using RAISERROR to return errors to the user

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.