Use of procedure and function in Oracle PL SQL Interview Questions And Answers For Experience & Freshers | Interview Preparation
Procedure:
A procedure does not have a return type and should not be returned at any value, but may have a return statement that simply stops its execution and returns it to the caller. A procedure is used to return multiple values otherwise it is usually similar to a function.
1) When application required returning multiple values.
2) When application required DML statements.
3) When application required returning multiple records.
Function:
The main purpose of a PL / SQL function is usually to compute and return a single value. The specification of a function has a return type and must return a value specified in that type.
1) When application required returning single value and calling that value in select statement.
2) When we are evaluating expressions.
3) When application required returning multiple records.
Please do check our daily posts, videos for beneficial informations, in case of any additional queries please do contact us, we are happy to assist you.
https://www.youtube.com/a4uofficial
0 Comments