• It is not possible to change the table data with the use of User defined functions but you can do it by using stored procedure.
• The execution of User defined function will be stopped if any error occurred in it. But in the case of Stored procedure when an error occurs the execution will ignore the error and jumps to the next statement.
• We can use User defined function in XML FOR clause but we can use stored procedure in XML FOR clause.
• It is not possible to make permanent changes to server environment whereas stored procedure can change some of the server environment.
• User defined functions do not return output parameters while stored procedure can return output parameters.