Stored Procedure returning more than 1 result set

170 views Asked by At

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

0

There are 0 answers