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

What is the difference between deallocate cursor and close cursor?

1231


Explain encryption of entire databases without the need for application changes in sql server 2008?

1026


How many replicas are maintained for each SQL Azure database?

142


What are the disadvantages of using the stored procedures?

1080


How do I install only the client tools of sql server 2000?

1045


List some major differences between triggers and stored procedures?

897


Insert syudents details in table.Current system date &time insert into joining time.How do insert?( in sysdate only return current system date how do add time?)

1845


Why variables called the most powerful component of ssis?

1059


How do you drop an index?

906


What are null values in ms sql server?

1063


Explain how to use linked server?

982


How can I add Reporting Services reports to my application?

129


Why use update_statistics command in sql server?

1031


Explain relational data?

900


what are the important architecture components of SSRS?

138