In explicit transaction, if i start the transaction by giving BEGIN TRANS but if i dont give COMMIT,ROLLBACK or END TRANS then what will happen to the application?
nothing - the transaction is still on-going. If you terminate the connection, it is rolled-back.
Because your transaction may lock parts of the database, you may cause other transactions/queries to block until you do issue one of those commands.
At some point, one way or another, the transaction has to be completed. When something goes 'wrong' (eg application ended), it will be rolled back, unless you commit it first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With