Answer Posted / mk
Function:-
A function is a predefined action which can consumed so that
retrieve the information from table in various scenario .
Procedure :-
procedure are SQl and PL/SQL code compile and stored in the
database.
Difference
Procedure
It may or may Not return a value
It can return multiple value also
It has both Input & output parameter
Doesn’t uses return statement for returning a value
Output Parameter will be specify using Output Clause
This allow select as well as DML operation
It support Transaction mgmt and error-handling using TRY and
Catch Block
They can call another procedure and function for Execution
Function
Function
It Must return a value
It can return only single value
It has both Input parameter
Uses return statement for returning a value
Output Parameter will be specify using Return Clause
This allow select as statement
Doesn’t support Transaction mgmt and error-handling using
TRY and Catch Block
They can call only another function for Execution
When will use :-
We will use procedure to perform complex business Logic as
well as we use function while performing simple
mathematical calculation.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to run create database statement again?
How to create a new table in oracle?
master table and child table performances and comparisons in Oracle ?
Why do you use stored procedures and state some of its disadvantages?
How to handle a single quote in oracle sql?
How to drop a stored procedure in oracle?
How to create a new table in your schema?
What is a connect identifier?
How do I connect to oracle?
How to load data through external tables?
Difference between varchar and varchar2 data types?
What is oracle update statement with inner join ?
How to do paging with oracle?
How to create an oracle testing table?
How to grant create session privilege to a user in oracle?