Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: using sequence in a trigger

Re: using sequence in a trigger

From: PaulCinVT <paulcinvt_at_aol.com>
Date: 22 Oct 1999 14:44:56 GMT
Message-ID: <19991022104456.05218.00000236@ngol02.aol.com>


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;

Paul in VT Received on Fri Oct 22 1999 - 09:44:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US