Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

pl sql auto increment

CREATE OR REPLACE TRIGGER dept_bir 
BEFORE INSERT ON departments 
FOR EACH ROW

BEGIN
  SELECT dept_seq.NEXTVAL
  INTO   :new.id
  FROM   dual;
END;
/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pl #sql #auto #increment
ADD COMMENT
Topic
Name
3+2 =