Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: insert a sequence into a table
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
![]() |
![]() |