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 |
can a database be shrunk to 0 bytes, if not, why? : Sql server administration
Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?
What are different types of raid configurations? : SQL Server Architecture
How do you open a cluster administrator?
What is mean by dml?
is there more the two primary key in a single table?
26 Answers Eforce, Systematix,
how can a database be repaired? : Sql server administration
Can sql server be linked with other servers like oracle?
how to get 25th row in any table in sqlserver can u tell me syntax
How to create a stored procedure with a statement block in ms sql server?
Why functions are used in sql server?
how to take backup bcp out for a column in table in sql server?