Home  >  Article  >  Database  >  oracle 触发器

oracle 触发器

WBOY
WBOYOriginal
2016-06-07 15:03:331142browse

CREATE TABLE t_expr_edition (id number(10),edition number(10)); // 建表 CREATE OR REPLACE TRIGGER trig_t_par_accitem // 触发器名 AFTER DELETE OR INSERT OR UPDATE ON t_par_accitem // 触发器关联表 BEGIN IF INSERTING THEN // 可以用来判断触发

CREATE TABLE t_expr_edition (id number(10),edition number(10));   // 建表


CREATE OR REPLACE TRIGGER trig_t_par_accitem   // 触发器名
AFTER DELETE OR INSERT OR UPDATE ON t_par_accitem   // 触发器关联表

BEGIN

IF INSERTING THEN  // 可以用来判断触发类型

update t_expr_edition set edition=edition+1 where id=1;    // 触发器执行的操作

END;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn