Query to check the consistency of records

Posted by orunner on Stack Overflow See other posts from Stack Overflow or by orunner
Published on 2010-06-17T23:32:30Z Indexed on 2010/06/17 23:53 UTC
Read the original article Hit count: 156

Filed under:
|
|

I have four tables

TableA:

  • id1
  • id2
  • id3
  • value

TableB:

  • id1
  • desc

TableC:

  • id2
  • desc

TableD:

  • id3
  • desc

What I need to do is to check if all combinations of id1 id2 id3 from table B C and D exist in the TableA. In other words, table A should contain all possible combinations of id1 id2 and id3 which are stored in the other three tables.

© Stack Overflow or respective owner

Related posts about sql

Related posts about query