`

Oracle 如何查询出一个表中相同的数据

 
阅读更多

1)
select *
from tab t
where exists (select 1 from tab where id = t.id and (name <> t.name or age <> t.age)

2)
select *
from tab
where id in (select id from tab group by id having count(*) > 1)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics