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

Home -> Community -> Usenet -> c.d.o.server -> Re: [Newbie] Serial Keys - How to implement

Re: [Newbie] Serial Keys - How to implement

From: JHY <jhy_at_earthling.net>
Date: Mon, 29 Jun 1998 22:24:11 -0400
Message-ID: <6n9i83$dpg@bgtnsc01.worldnet.att.net>


BTW, how much did it cost to send a t-shirt to sweden?

Mattias Malmgren wrote:

> Hello!
>
> In Oracle 8 there is something called sequences. Sequence number generation is
> useful to generate unique primary keys for your data automatically.
>
> CREATE SEQUENCE customer_seq
>
> And then it can be used like this:
>
> INSERT INTO customer (customer, name)
> VALUES (customer_seq.NEXTVAL, 'Mattias');
>
> Each time customer_seq.NEXTVAL is called 1 will be added to the sequence.
>
> Greetings / Mattias
>
> David C. Harrison wrote:
>
> > How do I make a statement like this:
> >
> > INSERT INTO customer
> > VALUES (0, 'Baney Rubble');
> >
> > auto increment the value of the primary key?
> >
Received on Mon Jun 29 1998 - 21:24:11 CDT

Original text of this message

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