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 do you mean by a tablespace?
What is a proxy object?
What is the recommended interval at which to run statspack snapshots, and why?
Difference between pre-select and pre-query
Can we use oracle pl/sql block in core java? if so how? pls get back to me .....
How to convert times to characters in oracle?
Can we store pictures in the database and if so, how it can be done?
What is recycle bin in Oracle?
Explain an index?
When do we use group by clause in a sql query?
What are the system predefined user roles?
What are the differences between char and varchar2 in oracle?
How do you increase the OS limitation for open files (LINUX and/or Solaris)?
How to use subqueries with the in operator using oracle?
What is an oracle wallet?