In this Oracle PLSQL database tutorial, we will learn what is the difference between PLSQL Procedure and PLSQL function.
Following are the difference in PLSQL function and procedure
1 function is used to calculate results using given inputs, A procedure is used to perform certain tasks in order.
2 A function can be called by a procedure. A procedure cannot be called by a function.
3 DML statements cannot be executed within a function. DML statements can be executed within a procedure.
4 A function can be called within a query. A procedure cannot be called within a query.
5 Whenever a function is called, it is first compiled before being called. A procedure is compiled once and can be called multiple times without being compiled.
6 function returns a value and control to calling function or code. A procedure returns the control but not any value to the calling function or code.
7 A function has no support for try-catch A procedure has support for try-catch blocks.
8 select statements can have a function call. A select statement can't have a procedure call.
9 Explicit Transaction Handling A function can not have explicit transaction handling. A procedure can use explicit transaction handling.
Oracle SQL Complete Tutorial/Training/Course for the beginner:
• Tutorial#1 Basics Of Oracle SQL for B...
follow me on:
Facebook Page:
https://www.facebook.com/Equalconnect...
/ equalconnect
/ lrnwthr
On this page of the site you can watch the video online PLSQL Tutorial#13 Key Points in Function and Procedure Difference in Procedure and function with a duration of hours minute second in good quality, which was uploaded by the user EqualConnect Coach 26 July 2020, share the link with friends and acquaintances, this video has already been watched 8,172 times on youtube and it was liked by 192 viewers. Enjoy your viewing!