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: Renaming a sequence

Re: Renaming a sequence

From: Tom Williams <tom_at_auga.com>
Date: Thu, 22 Nov 2001 16:27:14 +0100
Message-ID: <OR8L7.412$TN1.28780@news000.worldonline.dk>


Not quite Conner...it only appears to work because if you try the following:

SQL> create sequence x;

Sequence created.

SQL> select x.nextval from dual;

  NEXTVAL


        1

SQL> select x.nextval from dual;

  NEXTVAL


        2

SQL> rename x to y;

Table renamed.

SQL> select y.nextval from dual;

  NEXTVAL


       21

Not exactly the result one is looking for...but rather another of Oracle's great mysteries.

"Connor McDonald" <connor_mcdonald_at_yahoo.com> wrote in message news:3BFB8EEF.2D65_at_yahoo.com...
> Silver wrote:
> >
> > If possible, how do I rename a sequence ? Oracle 8.1.7 on Solaris.
> > Thanks.
> > Silver
>
> mcdonac_at_db1> create sequence x;
>
> Sequence created.
>
> mcdonac_at_db1> rename x to y;
>
> Table renamed.
>
> mcdonac_at_db1> select y.nextval from dual;
>
> NEXTVAL
> ----------
> 1
> Interesting, but it appears to work.
>
> --
> ==============================
> Connor McDonald
>
> http://www.oracledba.co.uk
>
> "Some days you're the pigeon, some days you're the statue..."
Received on Thu Nov 22 2001 - 09:27:14 CST

Original text of this message

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