Finding NoMatches in MySQL

From: Date: Sun, 29 Jul 2001 21:56:15 +0000
Subject: Finding NoMatches in MySQL
Groups: php.db 
Request: Send a blank email to php-db+get-10882@lists.php.net to get a copy of this message
Hi all During the process of importing a lot of Oracle data into MySQL, I have two tables that are giving me a bit of a headache. One is a list of jobs and the other is a list of employers. There's now a unique id for each table, and the job table also has a column called id1, which *should* correspond to employers.uid. With me so far? Well, the problem is that there were loads of duplications in the employers table, and after deleting the duplicates some of the jobs.id1 records now point to non-existing records. How do I do a query that does something like this... select jobs.uid from jobs where jobs.id1 not in employers.uid ??? many thanks in advance! Dave

« previous php.db (#10882) next »