Re: finding unmatched values from two columns
First of all, I'm sure it's a typo, but those commas in the WHERE clause should be periods. :-)
Second, what you are looking for is an outer join. To find rows in t1 that are not in t2, try this:
SELECT t1.c1
FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c2
WHERE t2.c2 IS NULL;
You can find more information (albeit a bit wordy) on the JOIN syntax here:
http://dev.mysql.com/doc/refman/5.0/en/join.html
-Dave
Edited 1 time(s). Last edit at 09/20/2006 08:17AM by David Shrewsbury.
Subject
Written By
Posted
September 20, 2006 07:59AM
Re: finding unmatched values from two columns
September 20, 2006 08:16AM
September 20, 2006 11:19AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.