Trigger updating column oracle

It works, but it won't tell you if the value changed, only that the column is being updated (even if the update doesn't change the value).Many applications update all of the columns in a table -- setting them to their old value, rather then trying to figure out exactly which columns have been updated by the client. create or replace trigger test_trigger 2 after update of x,y on test 3 for each row 4 begin 5 if updating( 'X' ) then 6 dbms_output.put_line( 'X is being updated' ); 7 end if; 8 9 if updating( 'Y' ) then 10 dbms_output.put_line( 'Y is being updated' ); 11 end if; 12 end; 13 / Trigger created.The actions you're performing on the data is technically different between the insert/update portions, but what about the business logic difference?IMO, your best bet is to contain a functional unit of work inside of a trigger, so that there is no discrepancy in what that trigger does.We can create a trigger to update the 'product_price_history' table when the price of the product is updated in the 'product' table.

Oracle automatically executes a trigger when a specified event takes place, which may be in the form of a system event or a DML statement being issued against the table.

For Example: The price of a product changes constantly.

It is important to maintain the history of the prices of the products.

Because the trigger uses the clause, it might be executed multiple times, such as when updating or deleting multiple rows.

You might omit this clause if you just want to record the fact that the operation occurred, but not examine the data for each row.