_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
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

覓伎蟆 覓伎企 手 蟲 觧觧 豺蟲螳 螳蠖譴 豺蟲れ ." (讌蠍覲企 願 螻 矩れ)