0

I have read that a stored proc can return more than 1 result set.

Lie it can be defined as below.

CREATE PROC Sales.ListSampleResultsSets
AS
BEGIN
SELECT TOP (1) productid, productname, supplierid,
categoryid, unitprice, discontinued
FROM Production.Products;
SELECT TOP (1) orderid, productid, unitprice, qty, discount
FROM Sales.OrderDetails;
END
GO

If this is the case how does the caller access each individual result set.

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
TheWommies
  • 4,922
  • 11
  • 61
  • 79
  • You would have to tell us at least what the database system is that you're using, and where you're calling this stored procedure from (what language / programming system). There's no universal answer to this - depends on your language and database system – marc_s Aug 12 '13 at 04:24
  • Thanks, its just SQL Server 2008 – TheWommies Aug 19 '13 at 02:37

0 Answers0