i have simple question regarding Triggers in sql.
I am completely new and i do not know how to handle it.
I have one table myshift with shiftid, starttime stoptime and lastupdate.
create trigger ShiftTriggerr on myshift for update as
if update(stoptime)
update myshift set lastupdated = getdate()
what i want is when stoptime will update, the lastupdate field will update with getdate().
but when i run this it does not update one row but updated all rows. I do not know how to apply check on this trigger