更新时间:2023-09-23 23:30:22
解决方案我在插入之前找到了更改表的位置。这基本上是其他人给出的解决方案,但是我需要转一圈。
The solution I found where to alter the table before inserting into it. It's basicly the solution other people gave, however I needed to make a few turns.
这就是我所做的:
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE Profile DROP PRIMARY KEY,
MODIFY _id INT PRIMARY KEY NOT NULL;
insert commmand here....
ALTER TABLE Profile DROP PRIMARY KEY,
MODIFY _id INT AUTO_INCREMENT PRIMARY KEY NOT NULL;
SET FOREIGN_KEY_CHECKS=1;