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 -> create sequence with subqueryfor starting value?

create sequence with subqueryfor starting value?

From: Neil Rothschild <nrothschild1_at_home.com>
Date: Sun, 30 Sep 2001 14:22:47 GMT
Message-ID: <XUFt7.19689$Xz1.4335830@news1.rdc1.md.home.com>


I would like to write a simple script to create a sequence and assign it a starting value of the current high value of the related column, something like this:

create sequence my_seq start with ( select max(unique_key) from my_table; );

No matter what I do, Oracle comes back with 'not a number'.

Is there a way to do this without dynamically creating and running a script file?

Thanks,
Neil Received on Sun Sep 30 2001 - 09:22:47 CDT

Original text of this message

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