inserted and deleted Tables

In most trigger situations, you need to know what changes were made as part of the data modification. You can find this information in the inserted and deleted tables. For the AFTER trigger, these tables are actually views of the rows in the transaction log that were modified by the statement. With the new INSTEAD OF trigger, the inserted and deleted tables are actually temporary tables that are created on-the-fly.

The tables have identical column structures and names as the tables that were modified. Consider the following statement that you can run against the Pubs database:

UPDATE titles 
 SET price = $15.05
 WHERE type LIKE '%cook%'

When this statement is executed, a copy of the rows to be modified is recorded along ...

Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition 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.