Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1847
  • Last Modified:

Finding Orphaned Records In Oracle Table

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?
0
Shaundinger
Asked:
Shaundinger
1 Solution
 
jrb1Commented:
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);
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now