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 / hemanth

1) functions are used for computations where as procedures
can be used for performing business logic

2) functions MUST return a value, procedures need not be.

3) you can have DML(insert, update, delete) statements in a
function. But, you cannot call such a function in a SQL query..
eg: suppose, if u have a function that is updating a table..
you can't call that function in any sql query.
- select myFunction(field) from sometable;
will throw error.
4)We can call a function from a procedure, but it is not
possible to call a procedure from a function

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of synonyms?

1198


How to create a new view in oracle?

1128


Can we call procedure inside function in oracle?

1149


What is a cursor and what are the steps need to be taken?

1286


What is meant by a deadlock situation?

1154


How to execute a stored procedure in oracle?

1148


How to display employee records who gets more salary than the average salary in the department?

1126


How to get a list of all background sessions in the database?

1040


Explain about functional dependency and its relation with table design?

1061


What is Java Pool in Oracle?

1245


Typically, where is the conventional directory structure chosen for Oracle binaries to reside?

2190


How to define an oracle sub procedure?

1231


How to delete a column in an existing table?

1130


how to make an oracle object

2394


How to run the anonymous block again?

1175