Hi All,
I was just going through SQL server database standards, wherein I found these statements mentioned below. But I actually did not understand, how they are justified. Thank you in advance for any information.
1. Do not use output parameters. Any information returned to the client should be done via a result set.
2. Do not create stored procedures that return multiple result sets.
How any information returned to the client should be done via a result set.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Jean PaulRank #32 · 38.5K reputationPosted Nov 26, 2011, 2:09 AM EST
The statements says that:
1. We can return result through output parameters
CREATE PROCEDURE GetImmediateManager @employeeID INT, @managerID INT OUTPUTBut this is not the recommended way and one should use the result set (Use SELECT statement in return)
2. Multiple result set not advised.
In applications usually a stored procedure returns only one result set. But stored procedures can return multiple result sets.
Eg: CREATE PROCEDURE GetMultipleResultSets
SELECT * FROM Table1
SELECT * FROM Table2
The above case is not recommended.