MySQL Forums
Forum List  »  Newbie

Re: problems with my first base
Posted by: Peter Brawley
Date: August 06, 2017 12:49PM

> could you check please the exact reason of the error message?

I cannot replicate the error. I conclude an unnoticed error caused it.

> isn't it better to see the list with numbers 1,2,3 instead of 1,2,4,7 when using select querry?

What's better about it?

Read the auto_increment spec in the manual. It does not guarantee gapless sequentiality. If you think about it, that would render auto_increment dangerous and useless--eg deletion of one row would require rewriting all greater key values and foreign key references to them.

Where there's a requirement for gapless sequences, they need to be coded.

> i'm quite sure there can be a lot of situations where you would want to see the exact number of specific item in list.

Are you now? Users probably more often remember entities by their real names than by their surrogate numeric identifiers, which are entirely arbitrary. IAC, if a client will pay for implementing strict sequentiality, you'll have a reason to provide it in code.



Edited 1 time(s). Last edit at 08/06/2017 12:49PM by Peter Brawley.

Options: ReplyQuote


Subject
Written By
Posted
Re: problems with my first base
August 06, 2017 12:49PM


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.