删除表中重复数据
Posted mb62caa7d6f2477
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了删除表中重复数据相关的知识,希望对你有一定的参考价值。
delete from t_major
where
speciality in (select speciality from (select speciality from t_major group by speciality having count(speciality) > 1) a)
and
id not in (select pid from (select min(id) as pid from t_major group by speciality having count(speciality) > 1 ) b)
以上是关于删除表中重复数据的主要内容,如果未能解决你的问题,请参考以下文章