re-numbering pimary-key

From: Michael Hill <hillmw_at_ram.lmtas.lmco.com>
Date: Mon, 15 Dec 2003 15:37:32 -0600
Message-ID: <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 Received on Mon Dec 15 2003 - 22:37:32 CET

Original text of this message