MySQL Forums
Forum List  »  Triggers

Re: Reserved IDs
Posted by: Peter Brawley
Date: October 06, 2014 11:25AM

> Is there any way to reserve IDs in MySQL?

Auto_increment isn't designed for that. I've seen hacks that sort of work, but whenever I've needed to reserve IDs I've built a table with the IDs, blocks &c, and written a Trigger or function that populates them as they're used.

Options: ReplyQuote


Subject
Views
Written By
Posted
2542
October 06, 2014 03:08AM
Re: Reserved IDs
1270
October 06, 2014 11:25AM


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.