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 is sql server programming?

0 Answers  


one of my database size is 2gb and Unrestricted Growth for Data file up to 10%.But every day after day I am getting Primary Data file is full 99.999 please take appropriate actions.Why it is? Even disk space is also not full,but still I am getting the alerts.

1 Answers   Cognizant,


How would you retrieve Unique rows from table without using UNIQUE and DISTINCT keyword?

2 Answers   Genpact,


What is split brain scenario in DB mirroring?

1 Answers  


What are the methods used to protect against sql injection attack?

0 Answers  






What method is used by the Command classes to execute SQL statements that return single values?

0 Answers   B-Ways TecnoSoft,


statement (of account) Receive ID_receive Date_receive Amount_receive TO_receive From_receive Description_receive 1 2010/01/01 500 Bank Ahmed Payment from the account 2 2010/02/01 700 Bank Ahmed Payment from the account Payment ID_payment Date_payment Amount_payment From_payment To_payment Description_payment 1 2010/03/01 1000 Ahmed Sales Sale goods 2 2010/04/01 1500 Ahmed Sales Sale goods How can crate Stored Procedures for the statement (of account) from these tables? I want statement (of account) like this: (in sql 2005) ID_ name description debit account credit account balance

1 Answers  


How column data types are determined in a view?

0 Answers  


Does index slows down insert statements?

0 Answers  


What is tempdb in sql server?

0 Answers  


What are the mathematical functions supported by sql server 2005?

0 Answers  


How to define output parameters in stored procedures?

0 Answers  


Categories