Re: re-numbering pimary-key
Date: 16 Dec 2003 18:14:58 -0800
Message-ID: <2687bb95.0312161814.7b93d774_at_posting.google.com>
Michael Hill <hillmw_at_ram.lmtas.lmco.com> wrote in message news:<3FDE299C.9C38C69E_at_ram.lmtas.lmco.com>...
> I have a series of tables that have primary-key / foreign key
> relationships where the primary key was being incremented in error by 20
> instead of by 1. The default cache value was set to 20. It has since
> been re-set to 1.
>
> I'd like to re-number the primary key and then re-set the sequence then
> back to the correct number to increment.
>
> Anyone have any lessons leaned that I need to watch in doing this?
>
> Example of proposed numbering change:
> If I have 1,4,8,12,18
>
> I would change:
> 18 to 99,
> 12, to 98.
>
> Then change
> 4 to 2,
> 8 to 3,
> 98 to 4,
> 99 to 5.
>
> Then change the next sequence number to 6.
>
> Anyone see any problem with this?
>
> Mike