create trigger tr on Table1 for insert,update as begin if update(Systemname) update Table1 set UpdateCount = (case when not exists(select * from deleted) then 1 else UpdateCount + 1 end) from Table1 inner join inserted on Table1.[<YourPKField>] = inserted.[<YourPKField>] where inserted.Systemname = 'SAP' end GO
source share