首页 > 数据库技术 > 详细

oracle 查某一列有重复值的记录

时间:2014-05-16 18:49:21      阅读:479      评论:0      收藏:0      [点我收藏+]

-- 查找重复记录
select names,num
from test
where rowid != (select max(rowid)
                 from test b
                where b.names = test.names and
                      b.num = test.num)

或者使用

select names,num
from test
where rownum!= (select max(rownum)
                 from test b
                where b.names = test.names and
                      b.num = test.num)

 

 

oracle 查某一列有重复值的记录,布布扣,bubuko.com

oracle 查某一列有重复值的记录

原文:http://www.cnblogs.com/rongfengliang/p/3725645.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!