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 -> A sequence problem

A sequence problem

From: Violin <violin.hsiao_at_mail.pouchen.com.tw>
Date: Tue, 13 Mar 2001 16:29:54 +0800
Message-ID: <u9StOnHxexseOC88siGgAq9TN81q@4ax.com>

  Dear All,

  If I create a sequence like this :
  create sequence myseq increment by 1 nocycle nocache;

 And use it for inserting rows into table:  select myseq.nextval into :new.col from dual;

 And assuming the last number of myseq is 123,  May I change the last_number to 10?
 (for some reason i have to do it ,
  such like deleting rows from 11th to 123th)  

 Is it possible? and how to?

 Or I just could do so?
 drop sequence myseq;
 create sequence myseq start with 10 increment by 1 nocycle nocache;

 Because I have lots of sequences , and insert triggers  drop and create sequence will cause many INVALID objects.

 I'm looking for a easy way.
 Thanks in advance.

 Best Regards,

 Violin.
 violin.hsiao_at_mail.pouchen.com.tw Received on Tue Mar 13 2001 - 02:29:54 CST

Original text of this message

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