SQL查询字段重复数据的方法

SQL查询重复数据的方法
select * from table where column in(select column from table group by column having count(*)>1)
若要将重复的值排列在一起,可使用order by
select a.* from table as a,(select column from table group by column having count(*)>1) b where a.column=b.column order by a.column

 

posted @ 2013-08-26 13:56  Karsase  阅读(659)  评论(0编辑  收藏  举报