row_triger.txt

来自「orale培训教材包括了所有的sql说明和实例」· 文本 代码 · 共 21 行

TXT
21
字号
desc user_triggers;
select trigger_body from user_triggers;


--列级触发器
DML Trigger Example with Restriction
This example creates a BEFORE row trigger named SALARY_CHECK in the schema SCOTT. The PL/SQL block might specify, for example, that the employee's salary must fall within the established salary range for the employee's job: 

CREATE TRIGGER scott.salary_check 
    BEFORE 
    INSERT OR UPDATE OF sal, job ON scott.emp 
    FOR EACH ROW 
    WHEN (new.job <> 'PRESIDENT') 
       pl/sql_block


Oracle fires this trigger whenever one of the following statements is issued: 

an INSERT statement that adds rows to the EMP table 

an UPDATE statement that changes values of the SAL or JOB columns of the EMP table 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?