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 service broker?

0 Answers  


How the data stores in a page?

1 Answers  


Can we store videos inside the sql server table?

0 Answers  


Why do we need normalization?

0 Answers  


Create a dts package to produce a text file using the ‘update statistics’ command for the tables in a database with obsolete statistics.

0 Answers  






What is blocking and how would you troubleshoot it?

3 Answers   HCL,


How do you Implement SSIS Packages in your Project?

0 Answers  


If we delete pack Spec what will be the status of pack Body ?

0 Answers   Nagarro,


What is Index ? Explain its Types?

2 Answers   ADP,


What are approximate numeric data types in ms sql server?

0 Answers  


What is resource governor?

0 Answers  


explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

0 Answers  


Categories