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
Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables
what is difference between sql plus and sql*plus? (not sql and sql plus).
What is the data pump export utility?
What are the set operators union, union all, minus & intersect meant to do?
how to code performance tuning of oracle PL/SQL? can any body send me the perfect answer?
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.
What are the parameters that we can pass through a stored procedure?
Can we call procedure inside function in oracle?
what is the use of triggers in Java program? I mean where do we use triggers in Java programming?
What are the differences between lov and list item?
What is the use of file param in imp command?
definition of cluster and non-clustered index?
How can we force the database to use the user specified rollback segment?
Give syntax for SQL and ORACLE joins.
How to synchronize 2 schema's objects?