The difference between function and stored procedure:
- Function returns only one value but procedure can return one or more than one value.
- Function can be used in select statements but procedure cannot be used.
- Function has only input parameters while Procedure can have an input and output parameters.
- Exceptions can be handled by try catch block in procedures but that is not possible in function.