Monday, 18 November 2013

Interview Question: What are Magic Tables in SQLServer


Magic tables are internal tables called ‘inserted’ and ‘deleted’ which are created and managed by SQL server.
Inserted‘ table holds the values that have been recently inserted.
Inserted‘ table also holds the updated values from a update operation on a table.
Deleted‘ table holds the values that have been recently deleted.
Deleted‘ table also holds the previous values from a update operation on a table.
These virtual tables are usually used with triggers to retrieve the inserted, deleted or updated rows.

No comments:

Post a Comment