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...


In the below query i have performed the commit transaction statement but still the values after the save are not saved.
Can you please let me know why are the statements after save are rolled back even after commiting the data. help me with the understanding

declare @trans2 varchar(10)='transaction2'
begin transaction @trans2
insert into emp values(100,'xy',600);
save transaction @trans2
insert into emp values(200,'pq',700);
insert into emp values(300,'pq',800);
commit transaction @trans2
rollback tran @trans2



In the below query i have performed the commit transaction statement but still the values after the ..

Answer / vijayalakshmi

declare @trans2 varchar(10)='transaction2' 
 begin transaction @trans2 
 insert into emp values(100,'xy',600); 
 save transaction @trans2 
 insert into emp values(200,'pq',700); 
 insert into emp values(300,'pq',800); 
 save transaction @trans2 
 commit transaction @trans2 
 rollback tran @trans2

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

How to defragment indexes with alter index ... Reorganize?

0 Answers  


Explain indexes disadvantages?

0 Answers  


What is a trace frag?

0 Answers  


mention different types of relationships in the dbms?

0 Answers  


Why we should not use triggers?

0 Answers  


When we should use @@error?

0 Answers  


What's the difference between a primary key and a unique key?

10 Answers   Wipro,


What is the Query of getting last 10 transaction Reports (like insert, update, Delete Data from Tabele) ?

4 Answers   Wipro,


wht's the differece between sqlserver05 and sqlserver2000

3 Answers  


What is Right Outer Join?

2 Answers  


What happens if the update subquery returns multiple rows in ms sql server?

0 Answers  


Can I recover a damaged SQL Server 2008 database with the undamaged .mdb and .ldf files?

3 Answers   Apple,


Categories