For Example: The price of a product changes constantly.
There are two types of triggers based on the which level it is triggered.
1) BEFORE UPDATE, Statement Level: This trigger will insert a record into the table 'product_check' before a sql update statement is executed, at the statement level.
Output: Mesage Current_Date ------------------------------------------------------------ Before update, statement level 26-Nov-2008 Before update, row level 26-Nov-2008 After update, Row level 26-Nov-2008 Before update, row level 26-Nov-2008 After update, Row level 26-Nov-2008 After update, statement level 26-Nov-2008 The above result shows 'before update' and 'after update' row level events have occured twice, since two records were updated.
Find the total value of each item (item price * qty).6.
Display the list of customers belonging to “Gujarat” state.7.