Hi,
I want to know that what is the transaction ,explain with the help of example ?
Loading
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
SenthilkumarRank #387 · 6.5K reputationPosted Apr 4, 2012, 7:29 PM EDT
Transactions are an inherent part of any application that collects or manipulates data.
For more info:
http://msdn.microsoft.com/en-us/library/ms188929.aspx
http://www.sqlteam.com/article/introduction-to-transactions
Jignesh TrivediRank #16 · 50.3K reputationPosted Apr 4, 2012, 7:40 PM EDT
A transaction in SQL (structured query language) is a larger unit of database processing that contains one or more database access operations like insertion ,deletion, retrieval and modification operations.
These transaction are required to fulfil certain characteristics like ACID (Atomicity,Consistency preservation,Isolation,Durability)
Example:In other word Transaction means being able to execute multiple statements as a single unit, so that either all the statements are executed or none are executed.
BEGIN TRAN _test
BEGIN TRY
-- your DML
COMMIT TRAN _test
END TRY
BEGIN CATCH
ROLLBACK TRAN _test
END CATCH
please refer
http://msdn.microsoft.com/en-us/library/ms188929.aspx
hope this help.