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
What is a partition in oracle?
What is the data type of dual table?
Explain what are the advantages of views?
What are named parameters?
Name the three major set of files on disk that compose a database in Oracle?
What privilege is needed for a user to create views in oracle?
What are transaction isolation levels supported by oracle?
How do we represent comments in oracle?
A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.
How to best split csv strings in oracle 9i?
What are the different windows events activated at runtime ?
What are the original export and import utilities?
What types of joins are used in writing subqueries?
How to create a new table by selecting rows from another table?
What is varray?