Re: help will be much appreciated - and a sample code
Posted by: Peter Brawley
Date: January 08, 2022 10:16AM

Three issues. First, what problem are you trying to solve by doing this? If you're trying to obtain gapless sequentiality from an auto_inrement column, forget it, that's not in the auto_increment spec.

Second, it's probably not the best approach to be trying to do such table maintenance in an app language. Better do it with the MySQL client program, or WorkBench, or a tool like Heidi which you mention.

And third, as of version 8, that sort of deployment of user variables is no longer guaranteed to work.

For a way to make and keep a column's values gaplessly sequential, see "Make values of a column sequential" at For more on creating such sequences see "Make a table of sequential ints" at the same site.

Options: ReplyQuote

Written By
Re: help will be much appreciated - and a sample code
January 08, 2022 10:16AM

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.