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
You want to implement the one-to-many relationship while designing tables. How would you do it?
What is the meaning of lock escalation and why/how to stop this? : sql server database administration
why would you use sql agent? : Sql server database administration
How to end a stored procedure properly in ms sql server?
Explain what is log shipping?
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?
List out a number of the wants to setup a SQL Server failover cluster?
Explain filestream storage of sql server 2008?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?
What happens if you are trying to access a schema not owned by you?
how can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role? : Sql server administration
Can primary key be a foreign key?
What are the operating modes in which database mirroring runs?
How extra digits are handled with numeric data type literals?
Explain about thread and memory management process of SQL?