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
how the indexes are stored in the Oracle Database?
What is the difference between Delete, Truncate and Drop in Oracle?
What is a dynamic performance view in oracle?
What is SQL Tuning Advisor in Oracle?
What is recycle bin in Oracle?
Explain the importance of .pll extension in oracle?
Query to retrieve record for a many to many relationship ?
Explain oracle instance.
How to drop an index?
How to retrieve data from an cursor to a record?
What is where clause in oracle?
Is oracle a language?
Explain the use of inctype option in exp command.
What are the different editions of oracle?
How do we create privileges in oracle?