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 happens if the update subquery returns multiple rows in ms sql server?

1102


How can we improve performance by using SQL Server profiler?

1032


List the ways in which dynamic sql can be executed?

1002


How do I setup a sql server database?

1052


How much does sql server 2016 cost?

1035


Please illustrate physical database architecture? : SQL Server Architecture

967


Explain what is public role in sql server?

1106


What are ddl triggers and types of ddl trigger?

1013


Can you import Microsoft Excel data to SSRS?

132


How to find out what is the default collation in a database?

1101


what is a live lock? : Sql server database administration

937


Why should we go for stored procedures? Why not direct queries?

1068


What is BLOCK statements in SQL?

1248


Tell me what is the significance of null value and why should we avoid permitting null values?

966


What is the full form of dql?

971