Difference between function and stored procedure
Difference between
function and stored procedure:
- Procedure can return zero or n values
whereas function can return one value which is mandatory.
- Procedure allow select as well as Data Manipulation Language statement (Insert,update,delete,select) in it
whereas function allow only select statement in it.
- Procedures can have input, output parameters for it whereas functions can have
only input parameters.
- Exception can be handled by try-catch block in a procedure whereas try-catch
block cannot be used in a function.