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