Can you have a nested transaction?
Answers were Sorted based on User's Feedback
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 |
Answer / visala
yes, we can have nested transactions. to know the nest
level use @@trancount
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / swapna
Yes, very much. Check out BEGIN TRAN, COMMIT, ROLLBACK,
SAVE TRAN and @@TRANCOUNT.
Is This Answer Correct ? | 1 Yes | 1 No |
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 |
What is sql server programming?
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.
How would you retrieve Unique rows from table without using UNIQUE and DISTINCT keyword?
What is split brain scenario in DB mirroring?
What are the methods used to protect against sql injection attack?
What method is used by the Command classes to execute SQL statements that return single values?
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
How column data types are determined in a view?
Does index slows down insert statements?
What is tempdb in sql server?
What are the mathematical functions supported by sql server 2005?
How to define output parameters in stored procedures?