SQLSTATE: Integrity constraint violation: 1062 Duplicate entry '146' for key 'PRIMARY' (SQL: insert into `staff` (`user_id`, `agent_id`, `created_at`) values (363, 2121, 1457079046))
The primary key in the table structure is
Id, since the increase, 146 this record does exist, insert, I did not provide
IdIn theory, the value of should be increased by itself. Since the value is increased by itself, there should be no duplicate primary key in theory.
May I ask what kind of situation will cause this kind of problem?
The primary key is duplicate, isn’t it clearly written?