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?

Answers were Sorted based on User's Feedback



What are the two virtual tables SQL Server maintains for triggers?..

Answer / laxman

OLD and NEW tables for oracle.

For sql server inserted & deleted.

Is This Answer Correct ?    19 Yes 0 No

What are the two virtual tables SQL Server maintains for triggers?..

Answer / 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

What are the two virtual tables SQL Server maintains for triggers?..

Answer / sri

The 2 virtual tables are the OLD and the NEW

OLD is invalid in the case of INSERT and NEW is invalid in
the case of DELETE statements

Inside the trigger we can use the OLD and NEW as follows

:OLD.columnname
:NEW.columnname

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More SQL Server Interview Questions

whats new about truncate in sql server 2008?

0 Answers   MedSave Healthcare, Serco,


how do you test proper tcp/ip configuration windows machine? : Sql server database administration

0 Answers  


What you can do to delete a table without the delete trigger firing?

0 Answers  


Is it possible to update the views? If yes, how, if not, why?

0 Answers  


What is difference between stored procedure and function?

3 Answers   L&T,


Thanks to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?

0 Answers  


What are the different normalization forms?

0 Answers  


what are triggers? : Sql server database administration

0 Answers  


What are the recovery models in sql server 2000?

0 Answers  


How to test a dml trigger in ms sql server?

0 Answers  


How raid can influence database performance?

0 Answers  


What are the advantages dts has over bcp?

0 Answers  


Categories