How do I do this in TSQL? : How UPDATE and SELECT at the same time
Asked
Active
Viewed 92 times
2 Answers
4
The TSQL equivalent of the answer in the linked question would be something like
UPDATE [table]
SET foo=1
OUTPUT INSERTED.*, DELETED.*
WHERE boo=2
In an update statement you can use INSERTED
to get the "after" values and DELETED
the "before" values.

Martin Smith
- 438,706
- 87
- 741
- 845