日期:2014-05-17  浏览次数:20456 次

如何查重复数据
A表中有MB001,MB002....MB030 三十个字段,MB001,MB002,MB003,MB004,MB005组成主件,只要这5个段一样时认定重复
请问应该如何将重复的查询出来

------解决方案--------------------
GROUP BY MB001,MB002,MB003,MB004,MB005 HAVING COUNT(1)>1
------解决方案--------------------
SQL code

select * 
from A表
group by MB001,MB002,MB003,MB004,MB005 
having count(1)>1