WHAT IS TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?

Answer Posted / subbarayudu

A Trigger is a block of code,fired whenever data in the underlying table is affected by any of the Data Manipulation Language (DML) statements -INSERT,UPDATE,OR DELETE.

whenever trigger fires,two special tables are created-
1.insert table 2.Delete table.

1.inserted table contains copy of all records that are insetred in the trigger table.
2.deleted table contains all records that have been deleted from trigger table.this table is used to refer old values.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are exact numeric data types in ms sql server?

508


How do I create a partition table in sql server?

490


how many clustered indexes can be created on a table? : Sql server database administration

561


What it means to be triggered?

496


What is data source view or dsv? : sql server analysis services, ssas

553






What is autocommit mode in sql server?

541


How to create function without parameter in sql server?

557


How can you list all the table constraints in a database?

505


Do you know what is bit data type and whats the information that can be stored inside a bit column?

550


What is an inner join?

526


What is a periodical index?

503


Where is localdb stored?

553


What are ddl triggers and types of ddl trigger?

604


What is the maximum length of an alert name?

597


What are the different types of join?

562