Hi
What is the Tranction in SQL Server 2008 ?
Tranction in SQL Server 2008
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Jun 7, 2012, 9:05 AM EDT
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
Jignesh TrivediRank #16 · 50.3K reputationPosted Jun 7, 2012, 7:44 PM EDT
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.