Transactions let you apply changes and commit or roll them back.
Transactions let you apply changes and commit or roll them back. Predict the output before running the example.
BEGIN; UPDATE orders SET amount=amount+100 WHERE order_id=101; SELECT order_id,amount FROM orders WHERE order_id=101; ROLLBACK;
What does today's SQL feature do, and when would you use it?
Run the statements together; ROLLBACK undoes the update.
Run the example, then modify one clause and predict how the result changes.
Run the statements together; ROLLBACK undoes the update.