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 turn on or off recycle bin for the instance?
What is the database name in oracle?
What is a Garbage Collection? and what is full recursive Garbage collection?
Explain the use of constraints option in exp command.
How many types of database triggers exist?
What is open database communication (odbc) in oracle?
What is concurrency in oracle?
is there a tool to trace queries, like profiler for sql server?
Explain integrity constraints?
How to define an oracle sub procedure?
How translate command is different from replace?
How to change user password in oracle?
How to execute the package in oracle?
1) Does oracle have any table which contain all the exceptions and it's code internally?
What is analyze command used for?