O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required