Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do you troubleshoot errors in a SQL Server Agent Job?

1104


What is the sql profiler?

999


How do you make a trace?

1073


What will be the maximum number of index per table?

1055


Where can you add custom error messages to sql server?

1161


What is the command used to recompile the stored procedure at run time?

1118


Name 3 ways to get an accurate count of the number of records in a table?

1085


What are drillthrough reports?

161


How to list all objects in a given schema?

1103


Does sql server use t sql?

1071


What is a view in sql?

1021


what is a deadlock? : Sql server database administration

1146


What is the difference between executequery () and executeupdate ()?

1109


How do I debug a stored procedure in sql server?

1174


What is the difference between sql server 2000 object owner and sql server 2005 schema? : sql server database administration

1037