update restart
Please note consistent read and current read when UPDATE statment start.
[@more@]CREATE TABLE ud2_test(c1 NUMBER,c2 NUMBER,c3 NUMBER);
INSERT INTO ud2_test VALUES (1,1,1);
COMMIT;
CREATE OR REPLACE TRIGGER trg_ud2_test
BEFORE UPDATE ON ud2_test
FOR EACH ROW
BEGIN
dbms_output.put_line(:OLD.c1 || ',' || :OLD.c2 || ',' || :OLD.c3);
dbms_output.put_line(:NEW.c1 || ',' || :NEW.c2 || ',' || :NEW.c3);
END;
session1:
update ud2_test set c1=c1+1 where c2>0;
update ud2_test set c1=c1+1 where c2>0 ;
update ud2_test set c1=c1+1 where c2>0;
session2:
set serveroutput on
update ud2_test set c1=c1+10 where c2>0;
(session1 commit)
1,1,1
11,1,1
4,1,1
14,1,1
1 row updated
rollback;
etc:
update ud2_test set c3=c3+10 where c2>0;
(session1 commit)
4,1,1
4,1,11
5,1,1
5,1,11
1 row updated
rollback;
CREATE OR REPLACE TRIGGER trg_ud2_test
BEFORE UPDATE ON ud2_test
FOR EACH ROW
BEGIN
dbms_output.put_line( :OLD.c2 || ',' || :OLD.c3);
dbms_output.put_line( :NEW.c2 || ',' || :NEW.c3);
END;
update ud2_test set c3=c3+10 where c2>0;
(session1 commit)
4,1,1
4,1,11
1 row updated
rollback;
update ud2_test set c3=c3+10 where c1>0;
(session1 commit)
4,1,1
4,1,11
4,1,1
4,1,11
1 row updated
rollback;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12402/viewspace-995965/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 4.2 配置 RestartREST
- restart oracle streamRESTOracle
- 4.1.1 Oracle Restart概述OracleREST
- How to Restart Qt ApplicationRESTQTAPP
- docker的restart策略DockerREST
- jupyter-kernelRestart:restart failedRESTAI
- 4.1 關於 Oracle RestartOracleREST
- check memcached process and restart if downREST
- SVG restart 動畫屬性SVGREST動畫
- SVG restart動畫屬性SVGREST動畫
- 4.2.1 關於配置Oracle RestartOracleREST
- 4.5 通過SRVCTL 呼叫Oracle RestartOracleREST
- 4.2.4 向Oracle Restart 配置新增元件OracleREST元件
- Oracle中的for update 和 for update nowaitOracleAI
- docker-compose up start restart區別DockerREST
- 4.1.6 Oracle Restart 與 Oracle Data Guard 整合OracleREST
- 4.2.10.1 Oracle Restart 相關變數配置OracleREST變數
- pm2 重啟策略(restart strategies)REST
- brew update
- select for update
- pod update -- Failed to connect to GitHub to update the CocoaPods/Specs specs repoAIGithub
- 4.2.5 從 Oracle Restart 配置中刪除元件OracleREST元件
- 4.1.4 關於啟動和停止Oracle RestartOracleREST
- SQL__UPDATESQL
- windows 10 updateWindows
- hyperf 服務管理指令碼 start、restart、stop、status指令碼REST
- 4.1.3 使用 Oracle Restart 元件啟停資料庫OracleREST元件資料庫
- [20190530]ORACLE 18c - ALTER SEQUENCE RESTART.txtOracleREST
- SNWeChatSDK update Cocoapods支援
- udgrade rubygems-update
- pod repo update 理解
- WPF DispatcherTimer update periodically
- Sql server with as update用法SQLServer
- lua的update、lateupdate
- For Update 加鎖分析
- Leetcode: 627 - UPDATE, SET, ifLeetCode
- MySQL InnoDB update流程MySql
- cocos2dx update scheduleUpdate to update or schedule(schedule_selector(fun),dt)
- 解決 sail composer update 時出現的 Update of laravel/sail failedAILaravel