Let\'s say I have to implement a piece of T-SQL code that must return a table as result. I can implement a table-valued function or else a stored procedure that returns a se
I personally use table valued functions when all I am returning is a single table with no affects. Basically I treat them like parameterized views.
If I need multiple recordsets returned or if there will be values updated in tables, I use a stored procedure.
My 2 cents