List:General Discussion« Previous MessageNext Message »
From:Peter Lauri Date:July 26 2006 5:31pm
Subject:JOIN table where not in other table
View as plain text  
Best group member,

I just made up this query, but let us work from this:

SELECT * FROM table1
LEFT OUTER JOIN table2 ON (table1.id=table2.id)
WHERE table2.prop IS NULL;

This selects all rows from table1 where the id is not also in the table2. Is
there any more logic way to do this, this is what I would like to do (in
words):

I want to select all rows in table1 that does not already have an reference
in table2.

Is that understandable? 

Best regards,
Peter Lauri

Thread
JOIN table where not in other tablePeter Lauri27 Jul
  • Re: JOIN table where not in other tableChris White27 Jul
    • RE: JOIN table where not in other tablePeter Lauri27 Jul
      • Re: JOIN table where not in other tableChris White27 Jul
        • RE: JOIN table where not in other tablePeter Lauri27 Jul
          • Re: JOIN table where not in other tableChris White27 Jul
            • RE: JOIN table where not in other tablePeter Lauri27 Jul
              • Re: JOIN table where not in other tableChris White27 Jul
                • RE: JOIN table where not in other tablePeter Lauri27 Jul
              • Re: JOIN table where not in other tablePeter Brawley27 Jul