Re: Serial/Auto-number Field

From: Don Granaman <granaman_at_mail.phonet.com>
Date: 1996/11/20
Message-ID: <5767mt$e9q_at_iorich.phonet.com>#1/1


In article <3294DB01.7DE1_at_econnect.ca>, Yudong Sun <ysun_at_econnect.ca> wrote:
>Sorry to bother you with a simple question.
>What is the ORACLE equiv. to other DBMS's Serial or Auto-number
>field type. I remember vaguely that I needed to create
>a table and then did a select on this table to get a unique
>number each time. What's the syntax then?
>
>Thanks a lot
>
>Yudong

create sequence SOME_SEQUENCE; -- There are additional options... select SOME_SEQUENCE.NEXTVAL from dual; --to get a sequence number

There are other ways to get a sequence number than "select ... from dual", but it must be in a select, insert, or update statement. Received on Wed Nov 20 1996 - 00:00:00 CET

Original text of this message