Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SEQUENCE
Using your example, could you not use
insert into muffel (spalte1,spalte2) values (seq.muffel.nextval,'one');
without the need for a before trigger.
Barry Jones
Logica UK Ltd.
Lothar Armbrüster <lothar.armbruester_at_rheingau.netsurf.de> wrote in article
<846.500T1187T11973314_at_rheingau.netsurf.de>...
> On 15-Jul-98 13:41:04 John Bester wrote:
> create or replace trigger tib_muffel before insert on muffel
> for each row
> begin
> select seq_muffel.nextval into :new.spalte1 from dual;
> end;
> /
>
> Then you can do the inserts:
>
> insert into muffel (spalte2) values ('test');
> insert into muffel (spalte2) values ('two');
>
> Hope that helps,
> Lothar
>
> --
> Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de
> Schulstr. 12 | lothar.armbruester_at_t-online.de
> D-65375 Oestrich-Winkel |
>
>
Received on Thu Jul 16 1998 - 06:30:52 CDT
![]() |
![]() |