0

I'm facing a weird problem with my PHPmyAdmin while inserting query! it shows that the data are duplicate but it doesn't, here's the error message bellow:

Error SQL query: Edit

INSERT INTO  `a5693029_mydb`.`student` (

`stuID` ,
`stuName` ,
`stuMajor`
)
VALUES (
'20120176106', NULL , NULL
)

MySQL said: Documentation

#1062 - Duplicate entry '2147483647' for key 'PRIMARY'

2 Answers 2

2

You need to change the definition of StuId. It cannot store numbers larger than 2147483647 (signed 32 bit limitation)

Sign up to request clarification or add additional context in comments.

Comments

0

Looks like you have a field in your table that as hit its maximum value. Increase the fieldsize to be able to insert another row.

You have a ton of rows :)

1 Comment

To me it looks like a combined key, not an auto-increment issue. The 2012 looks like year and 01 may be January. The rest could be incremented though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.