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

How to write a query with an inner join in oracle?

1041


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.

5554


What is a procedure in oracle?

1199


How many types of cluster table in Oracle?

1034


Will you be able to store pictures in the database?explain.

992


query optmization techniques and quwry analyser+projects+ppts

2421


What is the purpose of tables, private synonyms and public synonyms in Oracle?

1046


Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?

2270


why dont we assign not null constraint as table level constraint.

2739


How can we view last record added to a table?

1038


Explain oracle’s system global area (sga).

1139


How to increment dates by 1 in oracle?

1089


How to define a record variable to store a table row?

1058


How to create additional tablespaces for an new database?

1029


How to create a server parameter file?

1137