網頁 尤其是這種更換后臺之類的做法 網站中的url是要保證不會變化的 如果按照你的做法做 那么id必然會出現變化 id變化 網頁的url就會發生變化 與預期要求不符 我已經找到答案了
create table linshi as select * from yuanbiao group by id having count(id) = 1;
insert into linshi select * from yuanbiao group by id having count(id) > 1;
delete from yuanbiao;
insert into yuanbiao select * from linshi;