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 is a bit datatype?

0 Answers  


Do you know what are the restrictions that views have to follow?

0 Answers  


What is Cross Join and in which scenario do we use Cross Join?

0 Answers   QuestPond,


What is default port number for sql server 2000?

0 Answers  


What are the different types of replication you can set up in sql server?

0 Answers  






What is dbcc command in sql server?

0 Answers  


What is the maximum number of index per table?

0 Answers  


What is a deadlock and what is a live lock?

0 Answers  


What is sql server management studio? : sql server management studio

0 Answers  


How do you troubleshoot errors in a SQL Server Agent Job?

0 Answers  


Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?

0 Answers  


What is a print index?

0 Answers  


Categories