LISTING 1: The AFTER Trigger CREATE TRIGGER AFTER_UPDATE_TITLES ON titles FOR update AS -- We will assume that more than one row could have been updated. -- The inserted and deleted tables will have to be joined on their -- primary key, so we can't allow changes to the primary key. IF @@rowcount = 0 RETURN IF UPDATE(title_id) BEGIN PRINT 'updates to primary key title_id are not allowed' ROLLBACK TRAN RETURN END IF UPDATE (price) IF (SELECT MAX(ABS((i.price - d.price)*100/d.price)) FROM inserted i JOIN deleted d ON i.title_id = d.title_id) > 10 BEGIN PRINT 'Too big of a price change' ROLLBACK TRAN RETURN END