Hi
What is the Tranction in SQL Server 2008 ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jun 7, 2012, 11:44 PM
A transaction is a single unit of work. If a transaction is successful, all of the data modifications made during the transaction are committed and they become a permanent part of the database. If a transaction encounters errors and then all of the data modifications are erased.
BEGIN TRAN jignesh_test
Select * from table1
Insert into table1 values(1,'test')
COMMIT TRAN jignesh_test
--ROLLBACK TRAN Jignesh_test
If Commit Trans is fire than one new row inserted in table1
if rollbask is called than it rollback transaction
hope this will help you.
Satyapriya NayakPosted Jun 7, 2012, 1:05 PM
Please refer the below links
http://msdn.microsoft.com/en-us/library/ms188929.aspx
http://www.codeproject.com/Articles/4451/SQL-Server-Transactions-and-Error-Handling
Thanks