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
How do you troubleshoot errors in a SQL Server Agent Job?
What is the sql profiler?
How do you make a trace?
What will be the maximum number of index per table?
Where can you add custom error messages to sql server?
What is the command used to recompile the stored procedure at run time?
Name 3 ways to get an accurate count of the number of records in a table?
What are drillthrough reports?
How to list all objects in a given schema?
Does sql server use t sql?
What is a view in sql?
what is a deadlock? : Sql server database administration
What is the difference between executequery () and executeupdate ()?
How do I debug a stored procedure in sql server?
What is the difference between sql server 2000 object owner and sql server 2005 schema? : sql server database administration