Wednesday, 3 July 2019

Procedures and Functions


Procedures
Functions
Procedure can return zero on N values
Functions can return only single value
Returning a value is not mandatory
Returning a single value is mandatory
Can have both input and output parameters
Can have only input parameters
Can select as well as other DML, Data Manipulation Language (INSERT, UPDATE, DELETE,) statements
Can only do select statement
Function can be called from procedure
Procedure cannot be called from functions
Try catch block can be used to handle the errors
Try catch block cannot be used in functions
Procedures cannot be utilized in select, where, having statement
Whereas functions can be utilized in select, where, having statement

No comments:

Post a Comment