What are Magic Table?

Answer Posted / imran badrampalli

There are 2 Magic Tables in SQL server Inserted and Deleted.
These are mantained by SQL server for Internal processing
whenever an update, insert of delete occur on a table.
However, we can refere these tables in a Trigger.
Whenever an update table statement is fired SQL server
mantains the original row before updation in a deleted
table and New (updated )row in a Inserted Table.

Same is the case when an insert is fired Only Inserted
table is populated with inserted Row.
and when Delete table statement is fired Deleted table is
populated with the deleted row.

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get a list of columns in a view using "sys.columns" in ms sql server?

733


Explain magic tables in sql server?

731


How global temporary tables are represented and its scope?

726


What is outer join in sql server joins?

757


What is equi join with example?

729


what is a self join? : Sql server database administration

703


What is use of attribute hierarchy ordered ? : sql server analysis services, ssas

748


What is the filtered index?

779


What is the difference between Stored Procedures and triggers?

808


Explain in brief how sql server enhances scalability of the database system?

702


Define cursor locking

747


How to truncate the log in sql server 2012? : sql server database administration

792


What are SSL and TSL protocols?

755


Explain the microsoft sql server delete command?

709


What is the difference between an index and a unique index?

743