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 function of master database?
How to perform key word search in tables?
How to connect sql server management studio express to sql server 2005 express?
What is the difference between mysql and mysqli?
How to provide values to user defined function parameters?
Differentiate between a local and a global temporary table?
What do you need to connect php to sql server?
Scalability, Availability, Integration with internet, etc.)?
Can we use where clause in union?
Name the different type of indexes in sql?
What are page splits? : SQL Server Architecture
What is difference between sql and sql server?
What is spatial and temporal data?
what is hash nonclustered index
What are the differences between stored procedure and the dynamic sql?