1) Create the 'product' table and 'product_price_history' table Once the above update query is executed, the trigger fires and updates the 'product_price_history' table.
Many times, however, it is more efficient to use a set-based approach to create new rows.
There are two types of triggers based on the which level it is triggered.
1) Row level trigger - An event is triggered for each row upated, inserted or deleted.
clause; columns not explicitly modified retain their previous values.
There are two ways to modify a table using information contained in other tables in the database: using sub-selects, or specifying additional tables in the you should ensure that the join produces at most one output row for each row to be modified.