whats the difference between a stored procedure and a table valued function? they seem to serve the same functions
views:
266answers:
1
+1
A:
Table-valued functions can return only a single result set; SPs can return multiple result sets.
You can subsequently query over the results of table-valued functions - but not with SPs.
So table-valued functions are more flexible if you don't need multiple result sets.
Joe Albahari
2009-05-12 10:30:26
"SPs can return multiple result sets" -- or, indeed, none i.e. they may just 'do stuff' and return a return value and/or raise warnings and/or errors.
onedaywhen
2009-05-12 10:49:09