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: how to use a sequence?

Re: how to use a sequence?

From: <sybrandb_at_yahoo.com>
Date: 23 Apr 2004 07:36:36 -0700
Message-ID: <a1d154f4.0404230636.676a61d@posting.google.com>


"Eric Lee" <lichoil_at_tom.com> wrote in message news:<c6at0k$cak$1_at_mail.cn99.com>...
> I have created a sequence named idx.
> How can I use this sequence when I create a table?
> I wanna create a table with primary key which can auto increment.
>
>
> thanks advance.

This is a FAQ and the answer has been posted NUMEROUS TIMES. Please try to
- read documentation
- search Google
prior to asking it AGAIN

Btw: use <sequence>.nextval in a pre-insert before each row trigger.

Sybrand Bakker
Senior Oracle DBA Received on Fri Apr 23 2004 - 09:36:36 CDT

Original text of this message

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