Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to reset Sequence values ?

Re: How to reset Sequence values ?

From: <steveee_ca_at_my-deja.com>
Date: Fri, 02 Feb 2001 14:05:57 GMT
Message-ID: <95ees0$tdu$1@nnrp1.deja.com>

In my day we had to walk twenty miles uphill to rename a table.. :)

Cheers,

Steve

In article <981043436.11199.0.nnrp-08.9e984b29_at_news.demon.co.uk>,   "Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote:
>
> Quite true - SQL Ref for 8.1.5 p.7-527
>
> RENAME old TO new ;
>
> Purpose
> To rename a table, view, sequence, or private synonym for a table,
 view, or
> sequence.
>
> Eeeh, when I were a lad, you could only rename a table !
>
> --
> Jonathan Lewis
> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
> Practical Oracle 8i: Building Efficient Databases
> Publishers: Addison-Wesley
>
> Reviews at: http://www.jlcomp.demon.co.uk/book_rev.html
>
> mhr123_at_my-deja.com wrote in message <95bv0c$nr4$1_at_nnrp1.deja.com>...
> >In article <3A796D99.63BF554C_at_edcmail.cr.usgs.gov>,
> > Brian Peasland <peasland_at_edcmail.cr.usgs.gov> wrote:
> >> Michael,
> >>
> >> Interesting... How do you propose renaming the sequence? There is
 no
> >> ALTER SEQUENCE RENAME command.
> >>
> >> But if you could, then I suppose you could guarantee automicity.
 You
> >> could also guarantee it by starting the database in restricted mode
 and
> >> altering the sequence as previously suggested. But this is still a
 long
> >> way to go when it is much easier to just drop and recreate the
 sequence.
> >>
> >> HTH,
> >> Brian
> >>
> >> > Hi,
> >> >
> >> > And thanks for the interesting input.
> >> >
> >> > In some cases you might be able to rename the sequence before
 altering
> >> > it, and back-name it when done. This would have many consequences
 like
> >> > invalidating procedures and package bodies, generate runtime
 errors
> >> > etc., but it would guarantee atomicity, wouldn't it?
> >> >
> >> > /Michael
> >> >
> >> > Sent via Deja.com
> >> > http://www.deja.com/
> >>
> >> --
> >> ========================================
> >> Brian Peasland
> >> Raytheons Systems at
> >> USGS EROS Data Center
> >> These opinions are my own and do not
> >> necessarily reflect the opinions of my
> >> company!
> >> ========================================
> >>
> >
> >Hi again,
> >
> >Not to go on discussing...
> >
> >The sequence is renamed with:
> >rename sequence whatsoever to anothername;
> >
> >Regards, Michael
> >
> >
> >Sent via Deja.com
> >http://www.deja.com/
>
>

Sent via Deja.com
http://www.deja.com/ Received on Fri Feb 02 2001 - 08:05:57 CST

Original text of this message

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