首页 > 数据库 > Oracle > 正文

Oracle创建序列和触发器

2024-08-29 13:54:25
字体:
来源:转载
供稿:网友

-- Create sequence 序列create sequence P_idminvalue 0maxvalue 9999999999999999999999999999start with 54787617increment by 1cache 20;

---触发器

CREATE OR REPLACE TRIGGER P_TRR_ID BEFORE

INSERT ON Person REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROWdeclarenextid number;beginselect P_id.nextval into :new.ID from sys.dual;end P_TRR_ID;--
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表