_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › PostgreSQL碁
|
|
BEGIN;
UPDATE accounts SET balance = balance - 100.00 WHERE name = Alice; -- etc etc COMMIT; BEGIN ~ COMMIT/ROLLBACK 磯 .
SAVEPOINT朱 れ螳 .. BEGIN;
UPDATE accounts SET balance = balance - 100.00
WHERE name = Alice;
SAVEPOINT my_savepoint;UPDATE accounts SET balance = balance + 100.00
WHERE name = Bob;
-- oops ... forget that and use Wallys accountROLLBACK TO my_savepoint; UPDATE accounts SET balance = balance + 100.00
WHERE name = Wally;
COMMIT; 碁 豌襴螻殊 る覃 れ螻 螳.
1. 碁
2. UPDATE
UPDATE accounts SET balance = balance - 100.00
WHERE name = Alice;
3. SAVEPOINT my_savepoint : 碁 讌蠍蟾讌 4. UPDATE UPDATE accounts SET balance = balance + 100.00
WHERE name = Bob;
5. れ 覦6. ROLLBACK TO my_savepoint : ル SAVEPOINT襦 覲糾
7. UPDATE
UPDATE accounts SET balance = balance + 100.00
WHERE name = Wally;
8. 碁 襭
鏤
|
磯Μ 殊 . る 朱 朱 訖企. ( ) |