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.
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 Apr 4, 2012, 11:40 PM
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.
SenthilkumarPosted Apr 4, 2012, 11:29 PM
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