Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 16. Using Stored Routines, Trigg... > Using a Stored Procedure to Return M...

16.4. Using a Stored Procedure to "Return" Multiple Values

16.4.1. Problem

You want to perform an operation that produces two or more values, but a stored function can return only a single value.

16.4.2. Solution

Use a stored procedure that has OUT or INOUT parameters, and pass user-defined variables for those parameters when you invoke the procedure. A procedure does not "return" a value the way a function does, but it can assign values to those parameters, which will be the values of the variables when the procedure returns.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial