Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What do you mean by a tablespace?

1035


What is a proxy object?

1061


What is the recommended interval at which to run statspack snapshots, and why?

2914


Difference between pre-select and pre-query

1101


Can we use oracle pl/sql block in core java? if so how? pls get back to me .....

2966


How to convert times to characters in oracle?

1023


Can we store pictures in the database and if so, how it can be done?

1030


What is recycle bin in Oracle?

1145


Explain an index?

1126


When do we use group by clause in a sql query?

1035


What are the system predefined user roles?

1039


What are the differences between char and varchar2 in oracle?

1164


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1929


How to use subqueries with the in operator using oracle?

1089


What is an oracle wallet?

939