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...

Explain Trigger with an example?

Answer Posted / rafi.sk

A trigger is a SQL procedure that initiates an action when
an event (INSERT, DELETE or UPDATE) occurs. Triggers are
stored in and managed by the DBMS.Triggers are used to
maintain the referential integrity of data by changing the
data in a systematic fashion. A trigger cannot be called or
executed; the DBMS automatically fires the trigger as a
result of a data modification to the associated table.
Triggers can be viewed as similar to stored procedures in
that both consist of procedural logic that is stored at the
database level. Stored procedures, however, are not event-
drive and are not attached to a specific table as triggers
are. Stored procedures are explicitly executed by invoking
a CALL to the procedure while triggers are implicitly
executed. In addition, triggers can also execute stored
procedures.
Nested Trigger: A trigger can also contain INSERT, UPDATE
and DELETE logic within itself, so when the trigger is
fired because of data modification it can also cause
another data modification, thereby firing another trigger.
A trigger that contains data modification logic within
itself is called a nested trigger.

Is This Answer Correct ?    36 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?

952


Which are the two editions in which SQL Azure database available?

119


How to search for a string in all stored procedure in sql server?

999


What is the default server name for sql server?

1170


What is lock escalation and what is its purpose?

974


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?

1916


Can you explain what is sql server english query?

996


explain different types of constraints? : Sql server database administration

957


What extended events?

1005


How check triggers in sql server?

992


what are the different ways to return the rowcount of a table?

1001


create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration

956


What is temporal data type?

922


How many types of the database links?

1070


What is transaction server distributed transaction?

1055