Topic: SQL, auto_increment issue...

Well I'm doing a project where I would like to 'reserve' some id's for potential future usage.

So, instead of just testing it on MySQL, I figured it's viser to check here, and see if you know of any issues, or how to solve it (unless it's really simple) wink

is it possible to just make a row where I want the restriction to end ... example:
I have used ACL's with `id` (unique, auto_increment) 1, 2, 3 ... 15 but I feel that in the future I might need up to 100 of these, and would like them to be in the low part of the id's ... and any other stuff other people create should therefore start at like 101 instead of 16

is the only thing needed to get that effect to insert a row with id 100, and all other will automatically go from 101 and increase (instead of using 16-99 first)

Re: SQL, auto_increment issue...

Yes, either that or you can manually set the next id for an auto incrementing key with:

ALTER TABLE blaha AUTO_INCREMENT=101

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: SQL, auto_increment issue...

ah nice, tanks!
hmm... and other databases than MySQL will obey it too? big_smile

Re: SQL, auto_increment issue...

Nope :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: SQL, auto_increment issue...

I was afraid of that ... heh