What are the magic tables available in SQL Server 2000?
I wonder, why they are \'magic\' tables?
Magic tables are nothing but inserted and deleted which are temporary objects created by the server internally to hold 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.
These two tables, inserted and deleted, are called magic tables.
The 'magic tables' are the INSERTED and DELETED tables, as well as the update() and columns_updated() functions, and are used to determine the changes resulting from DML statements.
The primary use of these tables are for more complex operations when triggers are fired.
GIYF:
The INSERTED and DELETED tables, popularly known as MAGIC TABLES, and update () and columns_updated() functions can be used to determine the changes being caused by the DML statements.