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

Explain what are the restrictions that views have to follow? : SQL Server Architecture

582


What are views in ms sql server?

589


Why use identity in sql server?

549


What is t-sql script to take database offline – take database online.

590


What happens if ntwdblib.dll is missing on your machine?

626






What is difference between commit and rollback when used in transactions?

486


Which command is used for user defined error messages?

550


What are the advantages of stored procedure in sql server?

453


How many types of built in functions are there in sql server 2012?

480


What are the advantages of policy management?

575


OPTIMIZATION OF SP,CURSOR,TRIGGERS

2199


What do you mean by a dependent functionality in a build?

652


What is the maximum size of a dimension? : sql server analysis services, ssas

550


Explain optimistic and pessimistic concurrency?

533


Explain what is public role in sql server?

568