' Skapa en testtabell:
create table MY_TEST_TABLE
(
ID NUMBER(15) NOT NULL
,A_STRING_FIELD VARCHAR2(255) NULL
);
' Skapa en sequence
create sequence TEST_SEQ start with 1;
' skapa en trigger
CREATE OR REPLACE TRIGGER MY_TEST_TRG
BEFORE INSERT on MY_TEST_TABLE
FOR EACH ROW
BEGIN
SELECT TEST_SEQ.NEXTVAL
INTO :NEW.ID FROM DUAL;
END MY_TEST_TRG;