List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 28 1999 11:24pm
Subject:Re: ERROR 1062
View as plain text  
At 4:01 PM -0700 10/28/99, John Embow wrote:
>Hello,
>
>I'm trying to drop all the rows in my database and reloading  the 
>data with a  LOAD DATA LOCAL INFILE  command. Problem is the primary 
>key field is auto-incrementing,  so i modify the column to remove 
>this, import the data, and then remodify the column to add 
>auto-incrementing again.  I get all the way to the part where i try 
>to remodify the column, and i keep getting the error:
>
>alter table blah
>modify id smallint(5) unsigned not null primary key auto_increment;
>
>ERROR 1062: Duplicate entry '587' for key 1
>
>I've also tried dropping the key and readding it, but i still get 
>the same error.


Hm.  587 is a strange number, but try dropping it and adding
it as a mediumint or int and see what happens.

What version of MySQL, by the way?

-- 
Paul DuBois, paul@stripped
Thread
ERROR 1062John Embow29 Oct
  • Re: ERROR 1062Paul DuBois29 Oct
    • Re: ERROR 1062John Embow29 Oct
      • Re: ERROR 1062Paul DuBois29 Oct
Re: ERROR 1062John Embow29 Oct
Re: ERROR 1062John Embow29 Oct