Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Renaming a sequence
On Thu, 22 Nov 2001 16:27:14 +0100, "Tom Williams" <tom_at_auga.com>
wrote:
>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.
>
Mystery? Not at all. Apparently when you rename a sequence you lose everything in the cache.
Add the NOCACHE keyword, and it works as "expected".
Brian Received on Thu Nov 22 2001 - 16:53:55 CST
![]() |
![]() |