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 the difference between deallocate cursor and close cursor?
Explain encryption of entire databases without the need for application changes in sql server 2008?
How many replicas are maintained for each SQL Azure database?
What are the disadvantages of using the stored procedures?
How do I install only the client tools of sql server 2000?
List some major differences between triggers and stored procedures?
Insert syudents details in table.Current system date &time insert into joining time.How do insert?( in sysdate only return current system date how do add time?)
Why variables called the most powerful component of ssis?
How do you drop an index?
What are null values in ms sql server?
Explain how to use linked server?
How can I add Reporting Services reports to my application?
Why use update_statistics command in sql server?
Explain relational data?
what are the important architecture components of SSRS?