Re: I need to change the auto incrementation of an integer

From: Brian W. Chester <bwchester_at_home.com>
Date: Thu, 04 Nov 1999 12:48:05 GMT
Message-ID: <9gfU3.669$Zu4.15934_at_news1.rdc1.mb.home.com>


Archaos,

You did not specify if the incrementation is done programmatically or by using a sequence. If you are using a sequence you could drop the sequence then recreate it. My experience with this type of item, is that it really doesn't matter what the value is, just as long as the value is unique.

DROP SEQUENCE schema.sequence_name;
CREATE SEQUENCE schema.sequence_name

    START WITH n

    INCREMENT BY n     -- this can be ignored if you are incrementing by 1
    NOMAXVALUE        -- or MAXVALUE n if you want to stop at a certain
level
    CACHE n;                    -- Cache a certain number if speed is
critical

Hope it helps.

Brian

archaos wrote in message <7vrs5s$1l7$1_at_jaydee.iway.fr>...
>when I delete the table ... new records won't begin at zero.
>I need to reset the counter of this field !!
>THX
>
>
Received on Thu Nov 04 1999 - 13:48:05 CET

Original text of this message