Forums | Webyog
Tools to manage and monitor MySQL databases
forums › forums › SQLyog › Using SQLyog › Error 1062
SQLyog logs all query(s) that it executes in the History Tab.
Can you see '127' being inserted twice?
Are you sure that your PK field is of integer type? Isn't it accidentally a signed tinyint? The error message may be caused by overflow…
I am getting the exact same error
Error No. 1062
Duplicate Entry '2' for key 1
There is no duplicate. I only have 2 entries in this table. They are both numbers.
21197
21385
That's it.
I can't find a reason for this error.
Can you send me your table structure and sample data?
Information about SQLyog and MySQL versions will be helpful.
I figured it out. (Tried to post yesterday but the site seemed to be down)
My field length was only set to 1, so MySQL was only taking the first number (in this case '2') when I was trying to manually enter data. My mistake.
Sorry for the inconvenience caused but our web-server went down for some time 🙁
This might explain terrym's problem as well.
Yes!
That's the problem. My id field was a tinyint, which only allows numbers up to 127.
At least we won't get that wrong again?
Thanks
Terry