Following are some major differences between a stored procedure and user defined functions:-
√ UDF can be executed using the "SELECT" clause while SP’s can not be.
√ UDF can not be used in XML FOR clause but SP’s can be used.
√ UDF does not return output parameters while SP’s return output parameters.
√ If there is an error in UDF its stops executing. But in SP’s it just ignores the error and moves to the next statement.
√ UDF can not make permanent changes to server environments while SP’s can change some of the server environment.
No comments:
Post a Comment