0

When we execute save, update or delete operation, we open a transaction and after completing operation we close transaction following a commit. If we run insert query with single or multiple row values, then what will happen?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Md. Asaduzzaman
  • 799
  • 1
  • 9
  • 12

1 Answers1

1

We use BEGIN TRAN in DELETE or UPDATE statement to make sure that our statement is correct and We get the correct number of results returned.

some developers doesn't use it in session or in batches , because they already try their statement and exactly know what it will do. I advise you to visit this URL , It's really useful:

https://www.mssqltips.com/sqlservertutorial/3305/what-does-begin-tran-rollback-tran-and-commit-tran-mean/