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 TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?

Answer Posted / sandeep

Triggers are also a stored procedure but it has some limits
and advantages over stored procedure.

first of all its limits. It cant accept or return values by
parameters whereas stored procedures do. It is called by
database server not by application or user.

It is generally treated as a constraint. It also make sure
the integrity of the data. We cud implement business rules
successfully by using triggers without writting a single
code in application. This is the main benifit of this
object we can change the business rule very easly from
database server when the actual business rules change that
means we dont want to edit and recompile the program soruce
code.

It will make problems in import process unless we switch
off the triggers.

There are 3 types of triggers in connection with insert,
update and delete statements

1. Before trigger
2. After Trigger
3. Instead of trigger

1. Before trigger fires before the manipulation of the data
happens by insert, update and delete statements. By using
this we cud do pre proces. ie updating other tables, pre
process of data, ..etc. After this actual manipulation
happens.

2. After triggers fires after the manipulation of the data
happens by insert, update and delete statements

3. Instead-of trigger. This trigger replaces the actual
manipulation statements. That means actual manipulation
statement wont work instead of this trigger will do the
manipulation work (statements in the trigger) by accepting
values from statement.

Is This Answer Correct ?    22 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I manually uninstall an instance of sql server 2016?

1017


1 01 101 01010

2041


What are the types of lock supported by ?

1036


What is the difference between function and stored procedure in sql server?

1053


How do I find sql server instance name?

953


What is cached report?

143


Tell me what is the difference between locking and multi-versioning?

1013


List the types of recovery model available in sql server?

921


How to disconnect from a sql server using mssql_close()?

1092


what is difference between view and Dip.

2403


How do I know if localdb is running?

941


what are constraints? Explain different types of constraints? : Sql server database administration

968


What are the pre-defined functions in the sql server?

1091


What is the difference between a "where" clause and a "having" clause?

1154


How to list all tables in the database using odbc_tables()?

1037