Magic Tables ?

Answers were Sorted based on User's Feedback



Magic Tables ?..

Answer / punit chauhan

whenever a trigger is fire in response to an insert, delete and update statement.
Two special tables create, these are the inserted and deleted tables, they are also referred as magic tables.

* whenever we insert any record into the table then trigger use inserted table.

* whenever we delete any record into the table then trigger use deleted table.

* whenever we update any record into the table then trigger use inserted and deleted tables.

Is This Answer Correct ?    16 Yes 0 No

Magic Tables ?..

Answer / rani

Refer this link which nicely demonstrates the Magic Table.
Magic Table are the INSERTED and DELETED tables which we
cannot see from the database, but can be accessed using
Triggers.
When a new row is added an INSERTED table gets created with
the inserted row. Similarly when a row is updated a DELETED
table is created with the deleted row. For update the old
data is moved to the DELETED table and the new updated row
gets created in the INSERTED table.

Is This Answer Correct ?    4 Yes 3 No

Post New Answer

More SQL Server Interview Questions

What to perform pattern match with the like operator?

1 Answers  


What is data source view or dsv? : sql server analysis services, ssas

1 Answers  


How to create a dynamic cursor with the dynamic option?

1 Answers  


What is the default fill factor value?

1 Answers  


What are views in ms sql server?

1 Answers  


What is index fragmentation in ms sql server?

1 Answers  


What are the advantages of using stored procedures in sql server?

1 Answers  


What are the magic tables in SQL Server 2000?

7 Answers   Infogain, Merrill Lynch,


write down the code for "how we delete a table without using of Drop command " ?

7 Answers   CarrizalSoft Technologies, Sonata,


What are the new features in SQL Server 2005 when compared to SQL Server 2000?

1 Answers  


What are the differences between stored procedure and the dynamic sql?

1 Answers  


How many types of objects are there?

1 Answers  


Categories