Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: auto increment...
Holy cow...
In article <90rmvv$2825k$1_at_ID-62141.news.dfncis.de>,
"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> create trigger foobri before insert on foo for each row
> begin
> select fooseq.nextval
> into :new.id
> from dual;
> end;
> /
> and that's all there is.
>
> Regards,
>
> Sybrand Bakker, Oracle DBA
>
> <schnurmann_at_my-deja.com> wrote in message
> news:90rju2$6pg$1_at_nnrp1.deja.com...
> > Ok, I'm lost. According to the docs the use of a sequence is good
as a
> > primary key. For the life of me I cannot create a table that uses
the
> > sequence. In mySQL this is so easy with auto_increment. How does
one
> > do this in Oracle??
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Dec 08 2000 - 21:27:09 CST