Difference
between Procedure and Function
- Usually functions are used to perform a specific computational task and procedures are used to perform or implement some business logic.
- Procedure may or may not return value but function should always return one value.
- We can call functions in select statement (That’s why we can use them in the script for creating views also) whereas for calling procedure we have to write a PL/SQL block in PL/SQL.
- We can call Stored Procedure within function. We can also call function within stored procedure.
No comments:
Post a Comment