Re: Duplicate entry '0' for key 'PRIMARY'

From: J.O. Aho <user_at_example.net>
Date: Sat, 8 Apr 2017 08:46:03 +0200
Message-ID: <ekrf9cFbudpU1_at_mid.individual.net>


[Quoted] On 04/08/17 04:41, fugee279_at_gmail.com wrote:
> I get this error when I try to read data into an empty table from a dumpfile.sql Anyone can help please? Thanks in advance
>

[Quoted] The original table from where your dump file is from didn't have the column as a primary key column, so now when your column is a primary key column it can't have two values with the same primary key.

You would need to manually edit your dump file, so that the column will only have unique rows (either removing one of the rows with primary key 0 or give one of the rows a new unique id). This will just fix so you can store the data back into the new table, not other inconsistencies with data.

-- 

 //Aho
Received on Sat Apr 08 2017 - 08:46:03 CEST

Original text of this message