Below trigger increments double(2,4,6,8...) not single. I want single. Where is mistake? If you can not help, is there other way to do auto increment?
CREATE TABLE MY_TEST ( IDNUM NUMBER, NAME VARCHAR2(4000) ) ; create sequence test_seq start with 1 increment by 1 nomaxvalue; create trigger test_trigger before insert on MY_TEST for each row begin select test_seq.nextval into :new.idnum from dual; end; insert into my_test values(test_seq.nextval, 'voila!');