1) stored procedures are designed to return its output to the application.
A UDF (User Defines Functions) returns table variables while a SPROC can't return a table variable although it can create a
table.
2) UDFs can't change the server environment or your operating system environment
while a SPROC can.
3) when T-SQL encounters an error the function stops
while T-SQL will ignore an error in a SPROC and proceed to the next statement in your code
(provided you've included error handling support).
4) a SPROC can be used in an XML FOR clause
a UDF cannot be.
5) If you have an operation such as a query with a FROM clause that requires a rowset be drawn from a table or set of
tables then a function will be your appropriate choice.
However when you want to use that same rowset in your application the better choice would be a stored procedure.