Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 

YOU ARE HERE: HOME Questions What are magic tables in SQL Server



SQL Server Magic Tables

View(s): 12666

What are magic tables in SQL Server?

Answer 1)
Sometimes we need to know about the data which is being inserted/deleted by triggers in database.

Whenever a trigger fires in response to the INSERT, DELETE, or UPDATE statement, two special tables are created. These are the inserted and the deleted tables. They are also referred to as the magic tables. These are the conceptual tables and are similar in structure to the table on which trigger is defined (the trigger table).

The inserted table contains a copy of all records that are inserted in the trigger table.
The deleted table contains all records that have been deleted from deleted from the trigger table.
Whenever any updation takes place, the trigger uses both the inserted and deleted tables.
  Asked in:  Mahindra Satyam   Expertise Level:  Experienced
  Last updated on Tuesday, 19 April 2011
3/5 stars (11 vote(s))

Register Login Ask Us Write to Us Help