October 13th, 2000, 01:17 AM
Very similar to selecting only those values in table1 that exist in table2 also, I want to select all those that exist in table1 but NOT in table 2.
I have no clue how to do this. I tried:
select table1.ID from table1, table2 where table1.ID <> table2.ID
but that does not work because it simply returns the rows in the reversed order.
select table1.ID from table1, table2 where table1.ID = table2.ID works for the opposite effect. (finding all rows where the value is same in the first and second table)
October 13th, 2000, 07:28 AM
You won't be able to do it in one query (until MySQL supports sub-selects).
October 13th, 2000, 05:07 PM
October 14th, 2000, 07:20 AM
I shouldn't answer posts before I've had my morning coffee....