62,614
社区成员
发帖
与我相关
我的任务
分享
select * from big
where id in
(
select id
from big
group by name having count(id) > 1
)
delete from big
where id in
(
select id
from big
group by id having count(id) > 1
)
and rowid not in
(
select min(rowid)
from big
group by id having count(id )>1
)
alter table table_name
add constraint PK_name primary key (id,name);