0
what is transaction
2 odpowiedzi
+ 2
It's a means of grouping several operations into one single "package". Transactions canbe rollrd back ot committed. The former means "discard the changes made by the operations inside the transaction". The latter means "ok, save those changes".
An example: you insert 100 rows, but those 100 inserts are a transaction. If you dont issue the commit command, the rows will never be inserted even thoug you just wrote insert 100 times.
+ 1
I've found that transaction is particularly useful for delete statements.
you can check how many records will be deleted before you commit the transaction.
If to many records get delayed you can use rollback if the delete query is in a transaction