Re: Auto Increment issue
Posted by: Peter Brawley
Date: August 19, 2021 11:34AM

The usual cause is an accidental user edit.

A common fix, given the last value before the jump interval of X and a first jumped value Y ...

set @x=X, @y=Y;

update tbl set id=id - (@y-@x-1)
where id >= @y;

Options: ReplyQuote


Subject
Written By
Posted
August 19, 2021 03:20AM
Re: Auto Increment issue
August 19, 2021 11:34AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.