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?
Asked
Active
Viewed 116 times
0
-
I'd suggest you try it out and see what happens. – Jim Jones Apr 20 '18 at 08:52
-
This might help https://stackoverflow.com/questions/4488853/why-do-i-get-an-open-transaction-when-just-selecting-from-a-database-view – DEarTh Apr 20 '18 at 09:06
1 Answers
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:

Ashraf Awad
- 26
- 2