Recently done Oracle and SQL Server database compatibility, feel that SQL Server really does not use Oracle, stored procedures can only return int type, crazy crazy
The difference between output and return of a stored procedure
SQL Rounding Ceiling ()
RETURN
Exits unconditionally from the query or process. RETURN is instantaneous and complete and can be used at any time to exit from a procedure, batch, or statement block. The statement after the RETURN is not executed.
The integer value returned. Stored procedures can return an integer value to the calling procedure or application
Unless specifically indicated, all system stored procedures return a value of 0 indicating success, and returning a value other than 0 indicates a failure.
When used for stored procedures, return cannot return null values. If the procedure attempts to return a null value (for example, using return @status and @status is NULL), a warning message is generated and a value of 0 is returned.
Output parameter outputs can be used to output any type of result (excluding table types), and return can only return an integral type and always return an integer value. The general return is used to terminate the process of the stored procedure and return. So return generally returns a value of 0. The output parameter is similar to the one in other programming languages, as in the case of an address.
Output can return multiple values, and its type is also a variety of
return returns only int, whose value is typically used in programming to represent the execution state of a stored procedure
SQL Server failed while converting nvarchar value ' XXX ' to data type int