What are main difference between Stored Procedure and
Functions.

Answer Posted / abhirup roy

In The above answers all the major differences have been disclosed, with one wrong information.
We can call a procedure from a function and vice-versa (as long as the function and procedure has same/similar scope).
In order to defend my point I am posting one small code below for reference.
DECLARE
PROCEDURE my_proc;
FUNCTION my_func RETURN NUMBER IS
BEGIN
my_proc;
RETURN -003;
END my_func;

PROCEDURE my_proc IS
BEGIN
DBMS_OUTPUT.PUT_LINE('22');
END my_proc;

BEGIN -- main
DBMS_OUTPUT.PUT_LINE(my_func);
END;

-- IT WILL WORK FOR EVERY OCCURRENCE --

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables

1579


what is difference between sql plus and sql*plus? (not sql and sql plus).

3342


What is the data pump export utility?

639


What are the set operators union, union all, minus & intersect meant to do?

560


how to code performance tuning of oracle PL/SQL? can any body send me the perfect answer?

4665






State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.

603


What are the parameters that we can pass through a stored procedure?

551


Can we call procedure inside function in oracle?

604


what is the use of triggers in Java program? I mean where do we use triggers in Java programming?

1693


What are the differences between lov and list item?

559


What is the use of file param in imp command?

642


definition of cluster and non-clustered index?

2475


How can we force the database to use the user specified rollback segment?

556


Give syntax for SQL and ORACLE joins.

630


How to synchronize 2 schema's objects?

1688