Diff between StoredProcedure and UserDefined Functions?
We can get multiple records set from Stored Procedure. From User Defined functions we can get maximum one recordset in form of table variable. Stored Procedure we can call from middle tier applciation like VB, ASP. User defined function can only used in T-SQL statements. User Defined function we can use as a Table in select statement or in Joins. One major difference is that UDFs can be used as part of an Expression and can be used in SQL Select clause so we cant use Functions to perform any kind of DML operations on the table.