Functions vs Stored Proc for returning dataset… | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Functions vs Stored Proc for returning dataset…

Hi All, I am investigating other options for returning the data to the calling reports or web apps. Since both a table-valued function and stored procedure can both return a dataset, what would be the better choice? My ultimate goal is speed, efficiency and manageability. it’s all good
Functions are intended for use where the standard object types fail to deliver. I wouldn’t use a function to replace a stored procedure. In any case, you would still need to call the function with a query statement like … SELECT * FROM MyFunction(@param) … to get any results.
Thanks Adriaan and good point. <img src=’/community/emoticons/emotion-5.gif’ alt=’;-)’ /><br /><br />it’s all good
]]>