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 / 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 |
Explain different types of Normalization.
0 Answers HPCL, Hughes Systique Corporation, Ittiam Systems,
How to maintain a fill factor in existing indexes?
What is a cube? : sql server analysis services, ssas
Can we return Data from 4(more than 1) tables in stored procedure?
What is failover clustering overview?
Tell me what do we need queues in sql service broker?
What is the difference between a clustered index and a non-clustered index?
What is the simplest way to create a new database in ms sql server?
Explain try...catch with sql server?
What are the advantages of partitioning?
What is the purpose of floor function?
What are the difference between primary keys and foreign keys?