This is a meta-question. How does one, using the INFORMATION_SCHEMA
provided with each database, discover the return value(s) of a stored procedure? With functions, the return value is explicitly declared and shows up in the INFORMATION_SCHEMA
under ROUTINES
.
However, stored procedures seem to be a bizarre grey area (as always is the distinction between SP's and functions). They seem to officially have no 'return value', but yet at the end you can run a SELECT statement such as:
SELECT RowID = @RowID;
For example; and in C# you read the return value from the column 'RowID'. This makes it clear that stored procedures actually are capable of returning values, albeit not within the context of T-SQL code like functions do.
How does one discover these values and their types without having to parse the definition itself?
EDIT
If you are searching for this, the return values of stored procedures are integers implicitly, but also can return data called result sets.