📜  pl sql auto increment - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:23.612000             🧑  作者: Mango

代码示例2
CREATE OR REPLACE TRIGGER dept_bir 
BEFORE INSERT ON departments 
FOR EACH ROW

BEGIN
  SELECT dept_seq.NEXTVAL
  INTO   :new.id
  FROM   dual;
END;
/