Dayrvia
SQL

Databases · Commit and rollback · Practice questions

Try 2 questions on Databases · Commit and rollback, then read the explanations and review the related concepts.

Practice questions

Choose an answer and move to the next question. Grade the last one to see explanations and review links.

2 questions
Q1 With initial stock 9 and no other changes, what is the final quantity?
BEGIN;
UPDATE stock SET qty = qty - 2 WHERE id = 1;
ROLLBACK;
Q2 Which property makes a transaction’s changes all take effect or none take effect?
Original practice questions written for Dayrvia.