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: insert a sequence into a table

Re: insert a sequence into a table

From: Bhooshan Prabhu <bhooshan.prabhu_at_citicorp.com>
Date: Wed, 30 Jun 1999 15:43:07 +0530
Message-ID: <3779EDB3.4C407053@citicorp.com>


Don't think you can use a WHERE clause to achive what u have in mind. At best, u can set the maximum limit for the sequence to 500(number of rows) and set the sequence as nocycle so that, sequence doesn't grow after 500..

bhooshan

CL wrote:

> hi there
> I have a table as
> CREATE TABLE tname(sn number(3));
> and then I want to insert value from 1 to 500.
> I created a sequence sq and I can do this:
> INSERT INTO tname VALUES(sq.nextval);
> the problem is how can I use WHERE clause
> to control the number of rows to be inserted?
> Regards
> Charles Luo
Received on Wed Jun 30 1999 - 05:13:07 CDT

Original text of this message

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