您的位置:首页 > 博客中心 > 数据库 >

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

时间:2022-03-10 17:10

-- 查找重复记录
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

热门排行

今日推荐

热门手游