net.anwiba.database.oracle.utilities.CallableCreateSequenceTrigger.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of anwiba-database-oracle Show documentation
Show all versions of anwiba-database-oracle Show documentation
anwiba oracle database project
CREATE OR REPLACE TRIGGER {0} BEFORE INSERT ON {1} FOR EACH ROW
DECLARE
v_nextval INTEGER;
BEGIN
WHILE (:NEW.{2} IS NULL) LOOP
SELECT {3}.nextval INTO v_nextval FROM dual;
:NEW.{2} := v_nextval;
END LOOP;
END;