List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 25 2002 7:40pm
Subject:Re: auto increment problem
View as plain text  
At 0:44 +0530 2/26/02, Chetan Lavti wrote:
>I creating a table where I am using one field as Auto Increment. I want
>to know two things or rather I want to do to thinks for the same column
>1. When I am inserting the values and the Query fails, the increment
>should not took place and
>2. When I delete a particular row from the table there should not be any
>gap in the auto increment sequence.
>Is it possible..??

No, in both cases.  There's an exception for your first question, which
is that if the query fails because it's syntactically invalid, the counter
will not increment.  But if it fails after MySQL has incremented the counter
and then something goes wrong, the counter won't decrement.

>I am not much enthusiastic about the second one because I don't think
>that I will use it.
>Anyone who can help me out for this.??
>Thanks and regards,
>Cretan Latvia

auto increment problemChetan Lavti25 Feb
  • Re: auto increment problemRodney Broom25 Feb
RE: auto increment problemRick Emery25 Feb
Re: auto increment problemPaul DuBois25 Feb