Finding Orphaned Records In Oracle Table

Posted on 2005-03-02
Medium Priority
Last Modified: 2008-03-17
I have three Oracle tables that share a common field.  Table A contains all records.  Tables B and C are index tables that contain a unique non-intersecting subset of records that together should equal all records in Tables A.  Table A however contains additional orphaned records that no longer are indexed in either Tables B and C.  How can I find the orphaned records in table A?
Question by:Shaundinger
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 25

Accepted Solution

jrb1 earned 2000 total points
ID: 13445427
select * from tablea
where not exists
(Select 'x' from tableb where tablea.key = tableb.key)
and not exists
(select 'x' from tablec where tablea.key = tablec.key);

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question