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
Explain alias?
How to change program global area (pga) in oracle?
What is set verify off in oracle?
How to export data to a csv file?
What is a database table in oracle?
You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces?
How to loop through a cursor variable?
How to invoke the original export import utilities?
i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?
What is the oracle implicit cursor?
State some uses of redo log files?
What is the difference between a primary key & a unique key?
What is oracle instant client?
What is ordinary table in oracle?
Can you create a synonym without having a table?