Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> sequence in trigger
I need an example of using a sequence in a trigger. I tried this, but I get a compiler error saying that the sequence cannot be referrenced in this context.
CREATE TRIGGER CUSTOMER_BEF_INS_KEY_ID
BEFORE INSERT ON JIM.CUSTOMER FOR EACH ROW BEGIN :new.KEY_ID:=CUSTOMER_SEQUENCE.NextVal; END;
Thanks
-- Jim Poe <jpoe_at_fulcrumit.com> Fulcrum InteTech, Inc.Received on Tue Mar 31 1998 - 00:00:00 CST