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 |
You are doing log shipping due to some reasons it is failing. How you will proceed from there
What is the size of transaction log file?
How can we delete a table in sql server?
How to know whether our backup is succesfully taken?
what operator performs pattern matching?
explain the type of contraints
How to create user messages with print statements in ms sql server?
In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram
Explain about merge replications?
explain extended properties
What is standby servers? Explain types of standby servers.
How to enter binary string literals in ms sql server?