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 |
Why is the need for data conversion transformations?
Explain basic SQL queries with SELECT from where Order By, Group By-Having?
When you use @@error and try-catch?
What is inline variable assignment?
What is the difference between indexing and hashing?
how can a database be repaired? : Sql server administration
What is mean by dml?
Tell me what is fill factor?
What is the joins and how many types of Joins in sql server a diffrentiate ever one give a suaitable query
Explain indexing and what are the advantages of it?
how to find the particular row in table?(means suppose one table contain 10 rows , in these 10 rows how to find the particular row(example in 10 rows i want 5 row how)?
16 Answers Accenture, IBM, Marlabs,
What is the difference between insensitive and scroll cursor?