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: Sequences?

Re: Sequences?

From: Adrian Capp <adrian.capp_at_blueyonder.co.uk>
Date: Tue, 12 Feb 2002 22:45:16 +0000 (UTC)
Message-ID: <a4c5tp$e2s$1@helle.btinternet.com>


To replicate the "AutoNumber" function even closer you could do the assigning of the "MYSEQUENCE.NEXTVAL" in the "Before Insert" Trigger.

Hope this is useful.

Maddy

"Magnus Ytterstad" <magnus.ytterstad_at_telia.com> wrote in message news:zPfa8.18091$n4.3132976_at_newsc.telia.net...
> Not sure how MS Access autonumber works, but it does sound like a sequence
> to me.
>
> To create a sequence use the following syntax
>
> CREATE SEQUENCE MYSEQUENCE INCREMENT BY 1 START WITH 1000;
>
> When you want to access the sequence and get the next number, you just
issue
> the command MYSEQUENCE.NEXTVAL, i.e.:
>
> INSERT INTO MYTABLE (NAME, DEPT, ID)
> VALUES ('John', 'Sales', MYSEQUENCE.NEXTVAL);
>
> Hope this helps!
> -magnus.
>
>
> Bruce <bghagy_at_attbi.com> wrote in message
> news:gP3a8.39737$bh3.256829_at_rwcrnsc52.ops.asp.att.net...
> > How would one go about implementing the MS Access autonmuber data type
in
> > 8i? Are sequences the way to go and could you point me in the right
> > direction.
> >
> >
>
>
Received on Tue Feb 12 2002 - 16:45:16 CST

Original text of this message

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