SQL Quiz: Transactions & ACID

This SQL quiz covers transactions, the tool that makes several changes succeed or fail together. You will predict data after COMMIT, ROLLBACK and savepoints, match failures to the ACID properties and recognise common isolation problems.

मीडियम 10 सवाल ~6 मिनट पास होने के लिए 80% SQLite

मोड चुनें

आप गेस्ट के तौर पर खेल रहे हैं: XP और streak सेव रखने के लिए साइन इन करें।

सैंपल सवाल

सवाल 1 / 10

What does this print?

CREATE TABLE accounts (name TEXT, balance INTEGER);
INSERT INTO accounts VALUES ('Ann', 100), ('Bob', 50);
BEGIN;
UPDATE accounts SET balance = balance - 30 WHERE name = 'Ann';
UPDATE accounts SET balance = balance + 30 WHERE name = 'Bob';
ROLLBACK;
SELECT balance FROM accounts WHERE name = 'Ann';
जवाब दिखाएं

B. 100 ROLLBACK undoes every change made since BEGIN, so both updates are thrown away and Ann still has 100.

इस क्विज़ में क्या है

  • BEGIN, COMMIT and ROLLBACK
  • Partial undo with SAVEPOINT and ROLLBACK TO
  • Autocommit mode
  • Atomicity, Consistency, Isolation and Durability
  • Isolation levels, dirty reads and non-repeatable reads

अक्सर पूछे जाने वाले सवाल

क्या अकाउंट ज़रूरी है?

नहीं। कोई भी खेल सकता है। XP, streak, badge और हिस्ट्री सेव रखने के लिए साइन इन करें।

क्या मैं इसे दोबारा दे सकता हूं?

हां। आपका बेस्ट स्कोर सेव रहता है, और हर बार सवाल और जवाब शफ़ल होते हैं।