_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › PostgreSQL碁

Contents



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 account
ROLLBACK 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. 碁 襭
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

ろ朱 豌 碁レ企朱 曙 覦襯願 豕企朱 覿襯 螳 炎概企 磯ゼ 蠍一!