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
If you have a function you could use it as a part of your SQL statement, for example
SELECT function_name(field1) FROM table
It does not work this way for the stored procedures.