Re: Comparing multiple Mysql tables to find duplicates

From: Date: Fri, 30 Jan 2004 17:55:38 +0000
Subject: Re: Comparing multiple Mysql tables to find duplicates
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-176373@lists.php.net to get a copy of this message
This will work for Mysql 3.23.54? -- Chris Bruce chris@idextrus.com Idextrus E-Business Architects http://www.idextrus.com 3282 Wilmar Cres. Mississauga, ON L5L4B2 CA 905.828.9189 On Jan 30, 2004, at 12:48 PM, John W. Holmes wrote:
From: "Chris Bruce" <chris@idextrus.com>
I am trying to write a function that would compare one table to a number of other tables in Mysql and remove any duplicates found. This is for tables of email addresses where I want to remove any dups found. Example: Master list - compare to list1, list2, list3, and so on and remove matches found from list1, list2, list3 etc. *not* from Master list. Does anyone know of any such beast before I set out to reinvent it?
DELETE FROM list1 USING master_list, list1 WHERE list1.email = master_list.email Repeat for other tables. ---John Holmes...


« previous php.general (#176373) next »