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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the web service used for reporting services?

123


What is ems sql management studio? : sql server management studio

1114


What is Extended user-defined?

963


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

945


List out the difference between union and union all in sql server?

994


How to find the version of sql server? : sql server database administration

1114


When to use null data driven subscription?

209


Explain the phases a transaction has to undergo?

1057


how to define testing of network layers? : Sql server database administration

975


What is code near application topology?

279


What are the types of database schema? : sql server analysis services, ssas

1134


how can u get last observation in an unknown dataset ?

2436


Can we return Data from 4(more than 1) tables in stored procedure?

1059


Explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

1168


what is the difference between Delete and Truncate command in SQL

1150