Hi.
Mssql
Just making sure I understand this correctly.
I'm viewing a trigger created by someone else that reads:
FOR INSERT, UPDATE
And the I have this:
-- only update if the password has actually been changed
IF EXISTS(SELECT 1 FROM INSERTED i JOIN DELETED d ON i.person_id = d.person_id WHERE i.person_password <> ISNULL(d.person_password, ''))
So the question is the DELETED. Why the comment writes only update if changed? What it looks like is only update if a row is bound to be deleted. Mind you I have never used Deleted and searching does not reveal any article. IS DELETED actually a trigger command?
Thanks
Edit: I guess Deleted is the changing column? They could have picked a better name :P

