I am creating a trigger based on an existing trigger written by a co-worker. He declares a cursor for the trigger with this syntax:
I am confused by the syntax of the select statement. I don't see how this is different from just plain:
. My co-worker has been doing this for years and knows that the syntax he has used is important, but can't remember why. If anyone can enlighten me, I would appreciate it.
Thanks.
Code:
DECLARE psCursor SCROLL CURSOR FOR
SELECT id FROM inserted WHERE id IN (SELECT id FROM inserted)
I am confused by the syntax of the select statement. I don't see how this is different from just plain:
Code:
SELECT id FROM inserted
Thanks.