Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How to reset Sequence values ?
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>...Received on Thu Feb 01 2001 - 10:07:12 CST
>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/