I read an article about Stored Procedures which said:
A stored procedure can return a single values such as a number or text value or a result set
I am confused, because if we declare multiple OUT parameters, the we can have multiple output but it said that we can have only a single value?
EDIT:
This is The Article
In SQL Server, a stored procedure can actually return a value -- always an integer. This is usually a status value and is quite separate from the output
parameters.
So you can can have:
execute @retval = usp_myproc @x1 output, @x2 output;
The returned value is generally not data, but a status.
That statement is not entirely correct.
There are three ways of returning data from a procedure to a calling program: result sets, output parameters, and return codes.
See Return Data from a Stored Procedure
This link will walk you through the 3 approaches.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.