I want to always update the value of an update row in the database.
Imagine, i have a table with names and prices Every time a row is inserted or updated, i want to lower the price by a fixed amount.
How can I do this with SQL server 2005?
I have now something like
CREATE TRIGGER LowerPriceOnInsert ON products
AFTER INSERT, UPDATE
AS
IF UPDATE(ProductPrice)