Can you have a nested transaction?

Answers were Sorted based on User's Feedback



Can you have a nested transaction?..

Answer / brahma

Yes,
Begin transaction t1
update <Table_Name> set <col1>=<col1>+50
Begin Transaction t2
delete from <Table_Name> set <col1>=<col1>+100
commit Transaction t2
end transaction t1

Is This Answer Correct ?    3 Yes 0 No

Can you have a nested transaction?..

Answer / visala

yes, we can have nested transactions. to know the nest
level use @@trancount

Is This Answer Correct ?    3 Yes 1 No

Can you have a nested transaction?..

Answer / swapna

Yes, very much. Check out BEGIN TRAN, COMMIT, ROLLBACK,
SAVE TRAN and @@TRANCOUNT.

Is This Answer Correct ?    1 Yes 1 No

Can you have a nested transaction?..

Answer / ram&saran

It's possible, up to 32 levels of transaction in sql server2005.
begin tran t1
----statements
begin tran t2
----statments
.
.
commit tran t2
commit tran t1

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More SQL Server Interview Questions

What Are Three Rules to UseĀ UNION IN SQL SERVER

1 Answers  


Is the order of columns in the set clause important in ms sql server?

0 Answers  


Explain what are sparse columns?

0 Answers  


How do triggers work?

0 Answers  


What is the difference between a primary key and a unique key? Are they the same?

0 Answers  






Do you know what is a trace frag? Where do we use it?

0 Answers  


Explain what role entity and relationship play in an ER diagram.

0 Answers  


What is scan table/view and seek table/view when its occurs? : sql server database administration

0 Answers  


What do you mean by an execution plan?

0 Answers  


What is scalar user-defined function?

0 Answers  


How can you get @@error and @@rowcount at the same time?

9 Answers  


What you can do to delete a table without the delete trigger firing?

0 Answers  


Categories