Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re:SQL Question-Please help (follow up)
Hubert,
Following up my own reply (had to leave for dinner) on what I said earlier about dividing the two tables, if your question involves the SQL statement for your query, it would look like this:
SELECT attr1
FROM b b1
WHERE NOT EXISTS
(SELECT *
FROM a
WHERE NOT EXISTS
(SELECT * FROM b b2 WHERE b1.attr1 = b2.attr1 AND a.attr2 = b2.attr2));
You can see now why 'not' appears twice in "select attr1 from B such that there does not exist an attr2 in A that attr1 in B does not have."
Noel Received on Fri Nov 10 2000 - 21:24:28 CST
![]() |
![]() |