PLSQL Tutorial#13 Key Points in Function and Procedure Difference in Procedure and function

Published: 26 July 2020
on channel: EqualConnect Coach
8,172
192

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  


Watch video PLSQL Tutorial#13 Key Points in Function and Procedure Difference in Procedure and function online without registration, duration hours minute second in high quality. This video was added by user EqualConnect Coach 26 July 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 8,172 once and liked it 192 people.