-----Message d'origine-----
De : Paul DuBois [mailto:paul@stripped]
Envoyé : jeudi 7 juin 2001 14:38
Cc : win32
Objet : Re: AUTO_INCREMENT: non-breakable numeric suite
On Thu, Jun 07, 2001 at 12:22:24PM +0200, Ismael Touama wrote:
> I don't understand the way to create an int field with AUTO_INCREMENT
> 'option' taht is always continue even if I delete some records.
> I don't want any hole in my suite.
Why not? MySQL doesn't care.
>>>>it's not about MySQL but here are ones of my constraints. I have to
number some facture (?) that are following each other.
In any case, if you want MySQL to use the lowest unused number in the
column (including any deleted entries anywhere in the sequence), you'll
have to handle that yourself. That's not what AUTO_INCREMENT is for.
>>>>OK
> I'm with version 3.23.38.
> My field is MEDIUMINT UNSIGNED AUTO_INCREMENT.It' not an INDEX
> I' m little bit confuse with LAST_INSERT_ID() and the following
instruction
> "DELETE FROM tbl_name WHERE 1>0".
> I think I could write a function by myself with "select count(*) from
> tbl_name..." but it may be not really optimized.
> What's the more easy and practice function to use?
>
> Thanks for tips.
> Ismaël.
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail win32-thread6369@stripped
To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail win32-unsubscribe@stripped instead.