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)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章