Magic Tables ?
Answers were Sorted based on User's Feedback
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 |
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 |
What is service broker?
How the data stores in a page?
Can we store videos inside the sql server table?
Why do we need normalization?
Create a dts package to produce a text file using the ‘update statistics’ command for the tables in a database with obsolete statistics.
What is blocking and how would you troubleshoot it?
How do you Implement SSIS Packages in your Project?
If we delete pack Spec what will be the status of pack Body ?
What is Index ? Explain its Types?
What are approximate numeric data types in ms sql server?
What is resource governor?
explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration