Below is the major differences between function and stored procedure
1. Functions must return a value while procedure may or may not return any value.
2. Function can return only a single value at a time while procedure can return one, many or none.
3. Function can be called from sql statements while procedures can't.
4. Execution of procedure is faster then function
5. Function can be used in select Queries statement but in stored procedure it's not possible.
ex. Select max(salary) from tbl_salary
Remove all XML tags from a string
11 years ago
No comments:
Post a Comment