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

How will you know when statistics on a table are obsolete?

1074


What is 'Join' and explain its various types.

1129


Explain the difference between clustered and non-clustered index?

918


how you can move data or databases between servers and databases in sql server? : Sql server administration

952


how many no of arguments can be passed in procedures and functions

5543


Can we use trigger new in before insert?

915


Can sql servers link to other servers?

1077


Give me a SQL Query to find out the second largest company?

1157


Write a query for primary key constraint with identity key word?

1017


What are the basic functions for master, msdb, model, tempdb databases?

1030


How to add additional conditions in SQL?

1015


What is the current limitation of the size of SQL Azure DB?

124


Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture

908


What are the various Operating system files that every SQL server 2005 database has and what is the purpose.

1048


Define inner join in sql server joins?

1045