May 10, 2010 at 5:18 pm
Hi,
I know this question is VERY simple but I cannot find the answer anywhere: what is the difference between an output and return parameter in TSQL?
Thanks
May 10, 2010 at 6:00 pm
OUTPUT parameters can also be used as input parameters in a stored procedure and are defined in the parameter section of a stored procedure. Please see "CREATE PROCEDURE" in Books Online for additional details.
RETURN parmeters are the integer that follows a RETURN statement. Please see "RETURN statement" in Books Online.
While you can have many OUTPUT parameters, you can only have 1 RETURN parameter at a time because the RETURN statement only allows the return of a single integer expression at a time.
To see how they are actually used, please see "EXECUTE statement, EXECUTE (Transact-SQL)" in Books Online where you'll find that RETURN returns the @return_status. Read the OUTPUT section in this same BOL article for how OUTPUT parameters work.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply