您的位置:首页 > 数据库

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

2013-08-26 13:56 483 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: