thank you very much; i'm using right now v3.23 as recommended for production servers, but anyway..
now, using the way you suggested, will this work: DELETE FROM tasks FROM tasks as t_child LEFT JOIN tasks as t_parent ON t_child.parent_id=t_parent.task_id WHERE t_parent.task_id IS NULL thanx :) -----Original Message----- From: Sergei Golubchik [mailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 1:57 PM To: Moshe Gurvich Cc: [EMAIL PROTECTED] Subject: Re: how to sub-select?.. Hi! On Oct 22, Moshe Gurvich wrote: > so what's the remedy? > how to do this task in MySQL without using subselects? > > > delete from followups where task_id not in (select task_id from tasks) > > Multi-table deletes (MySQL 4.0.0+) DELETE followups FROM followups LEFT JOIN tasks USING(task_id) WHERE tasks.task_id IS NULL; Regards, Sergei -- MySQL Development Team __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany <___/ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php