On Thursday 05 February 2004 15:50, Daniel R. Anderson wrote:
> I got the following error on a perl script:
>
> "Duplicate entry '273' for key 1"
>
> I googled for it and found a thread telling me to DROP the table and re
> CREATE it.  So I did, and my script is working fine.  My question: why
> did this happen, why did dropping and recreating work, and what can I do
> in the future if this happens and I've got things in my database I don't
> want to DROP?

That's using a sledgehammer to put in a pin, and knocking the wall down 
instead.

What it means is that you have an index (primary key or otherwise) on a 
column.  You've defined that that index is a unique index, so there can only 
be one of that value in that column in the table.  You've then tried to 
insert the same value twice.  Two of the same != unique.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to