Header Ads


trigger is collection of sql statements.

we will write triggers on tables.
if we want to trigger an event to another table based on a table at that time we use triggers.

we have Insert, Update, Delete type triggers.
suppose I have 2 tables with following structure
Tbl1 --> Col1, Col2
Tbl2 --> Col1, Col2, Col3

i want to insert a record in Tbl2 when a record has insert in Tbl1 with those details at that time we use insert trigger, to update Tbl2 as Tbl1 we use Update trigger and to delete Tbl2 record when we delete Tbl1 record at that time we use Delete trigger.

No comments:

Powered by Blogger.