Re: Auto Increment Problem

2009-12-05 Thread Victor Subervi
Oops. Never mind. V On Sat, Dec 5, 2009 at 1:19 PM, Victor Subervi wrote: > Hi; > > mysql> insert into categories (Category, Parent) values ('test', NULL); > ERROR 1062 (23000): Duplicate entry '0' for key 1 > mysql> describe categories; > +--+-+--+-+-+

Re: auto increment problem

2002-02-25 Thread Rodney Broom
From: Chetan Lavti <[EMAIL PROTECTED]> > 1. When I am inserting the values and the Query fails, the increment > should not took place and It doesn't. > 2. When I delete a particular row from the table there should not be any > gap in the auto increment sequence. This doesn't work. Although y

Re: auto increment problem

2002-02-25 Thread Paul DuBois
At 0:44 +0530 2/26/02, Chetan Lavti wrote: >hi, >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. W

RE: auto increment problem

2002-02-25 Thread Rick Emery
1. The auto_increment will not occur on failure. Try it yourself to verify; I did. 2. When you delete a row, you DO NOT WANT the auto-increment to re-number. You SHOULD have gaps. Why? Because if the auto_incremented field is a primary key, and there are other tables who fields refer to that