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 is difference between triggers and stored procedures.
And advantages of SP over triggers ?

Answer Posted / jaya

1) Stored procedures can accept parameters and can return values. Triggers can neither accept parameters nor return values.

2) A Trigger is dependent on a table and the application has no control to not fire a trigger when not needed. On the other hand, a stored procedure can be called as needed.

3) Procedure runs only when one call them manually whereas a trigger runs when there is any activity(insert,update,delete) on table on which the trigger is written.
4) Firing of a stored procedure can be controlled whereas on the other hand trigger will get fired whenever any modification takes place on the table.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between rollback and rollback to statements?

1060


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

1096


What are crud methods?

1036


Which sorts rows in sql?

1020


How long does it take to learn pl sql?

1062


What is trigger in sql?

1101


What is difference between mysql and postgresql?

1156


Explain autonomous transaction.

1156


what are the differences between require and include, include_once and require_once? : Sql dba

1023


What is the basic structure of an sql?

1099


What are the types of records?

988


How much does sql cost?

1006


what is normalization? : Sql dba

1087


What are the types of subqueries?

1055


What is join view in sql?

945