Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: using sequence in a trigger
In article <7uo3kn$ogb$1_at_nnrp1.deja.com>, ccyr6798_at_my-deja.com writes:
> if inserting then
> :new.met_id := met_id_seq.nextval;
> end if;
>
This is what you want...
SELECT met_id_seq.nextval
INTO :new.met_id FROM dual;