Inserted and Deleted Tables
Inside the trigger, you can check the previous and after column values for the affected rows by reading two virtual tables: Inserted and Deleted. The Inserted and Deleted tables are read-only in-memory virtual tables with the same columns as the base table.
The Inserted table contains the new inserted rows in a trigger defined for an INSERT statement or the new values for modified rows in a trigger defined for an UPDATE statement. In a trigger defined for a DELETE statement, the Inserted table exists, but it is empty.
The Deleted table contains the deleted rows in a trigger defined for a DELETE statement or the old values for modified rows in a trigger defined for an UPDATE statement. In a trigger defined ...
Get Microsoft® SQL Server™ 2000 Programming by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.