Interviews5 answers
What are magic tables?

Akhil Mittal
Posted Jun 4, 2014, 5:58 AM EDT5 Answers
Magic tables are nothing but inserted and deleted which are temporary object created by server internally to hold the recently inserted values in the case of insert and to hold recently deleted values in the case of delete, to hold before updating values or after updating values in the case of update
Muneer LeoPosted Jan 11, 2017, 2:13 AM EST
Deleted and Inserted are the magic tables in the sql server. These magic tables are used in the triggers to get the inserted and deleted values.
VelMurugan PalanivelPosted Sep 11, 2014, 2:40 AM EDT
Magic tables are used by mostly triggers in SQL Server. DML Language uses these table to store data tempararey.
Divendra OjhaPosted Jul 17, 2014, 1:18 AM EDT
Magic tables are logical tables which are managed internally by SQL Server. In every DML operations first data move into these tables. "INSERTED" and "DELETED" are tables names for magic table. We can't access these tables except in trigger.
Pankaj BajajPosted Jun 7, 2014, 1:53 AM EDT
Often we need to know about the data which is inserted/deleted by the triggers in database. With the insertion and deletion of data, tables named “INSERTED” and “DELETED” automatically gets created in SQL Server which contains modified/deleted data.
These “INSERTED” and “DELETED” tables are called magic tables.
Akhil MittalPosted Jun 4, 2014, 5:58 AM EDT

