What are the Magic Tables in Sql server?

 Posted by vishalneeraj-24503 on 8/1/2014 | Category: Sql Server Interview questions | Views: 268 | Points: 40

Sql Server automatically creates and manages two temporary,memory-resident tables that are called as Deleted and Inserted tables which are popularly known as Magic Tables.
Usually these magic tables are used with the DML triggers.We Can not directly modify the data in the tables or perform ddl operation.
Primarily used to perform certain action like-

1). Extend referential integrity between tables.
2). Test for errors and take action based on the error.
3). Find the difference between the state of a table before and after data modification and take actions based on that difference.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response