Transactions#
A transaction groups a set of statements so that they either all take effect or none do. Querona
supports explicit transactions with BEGIN TRANSACTION, COMMIT and ROLLBACK.
BEGIN TRANSACTION#
Starts a new transaction.
COMMIT#
Makes the changes made in the current transaction permanent.
ROLLBACK#
Discards the changes made in the current transaction.
Example#
BEGIN TRANSACTION;
UPDATE dbo.Account SET Balance = Balance - 100 WHERE Id = 1;
UPDATE dbo.Account SET Balance = Balance + 100 WHERE Id = 2;
COMMIT;