What are the two virtual tables SQL Server maintains for
triggers?
Answer Posted / sanjeev kumar
Two virtual tables are:
1) Inserted
2) Deleted
these two tables are also called magic table.
it has no any physical existence. it is used to keep trac of
the previous data when DML operation used.
it's used in a trigger.
Example:
Create trigger testtri on test3
for update
as
begin
declare @previousname varchar(50) -- local variable
select @previousname = del.name from deleted del
insert into test(name)values(@previousname)
end
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is mscorsvw.exe - process - microsoft .net framework ngen?
Define model database?
What is unique key constraint?
What is history table in sql server?
What is a heap?
What are various limitations of the views?
Is sql server free?
Explain different forms of normalization?
What is the dbcc command and why is it used?
Is it possible to call a stored procedure within a stored procedure?
What are data regions?
Can anyone tell that the extra features are there in SQL SERVER 2008 that are not available in previous versions .
What’s the use of custom fields in report?
how to take backup bcp out for a column in table in sql server?
How to enter binary string literals in ms sql server?