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
explain what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration
What is the index requirement in SQL Azure?
What is sql server used for?
What are the types of ssrs?
What is difference between drop truncate and delete?
How can we check the sql server version?
What is query parameter in ssrs?
What happens if null values are involved in datetime operations?
What is a fan-out query in SQL Azure?
1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?
How to copy the tables, schema and views from one sql server to another?
Can you use order by when defining a view?
Explain about local stored procedure?
How to create function with parameter in sql server?
Define cross join in sql server joins?