The logical tables INSERTED and DELETED of SQL Server are accessible only inside triggers. The schema of the logical tables is similar to the schema of table to which triggers are attached. These tables hold data of new and old states of rows modified using DML statements like UPDATE, DELETE and INSERT. For example if a record is updated using an UPDATE statement, the INSERTED table holds the newly updated row data and DELETED tables contains previous version of updated data rows. The following are few interesting facts about these tables
- In SQL Server 2000, these logical tables internally refer to database transaction log to provide data when user queries them.
0 Comments:
Post a Comment