MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:October 6 2000 10:51am
Subject:Re: Joins in DELETE; Impossible?
View as plain text  
Johan Andersson writes:
 > DELETE
 > FROM forum_message a, forum_message b
 > WHERE b.id IN (1) AND (b.id = a.id OR (a.thread_id = b.thread_id AND a.id > b.id
AND a.thread_depth > b.thread_depth) )
 > 
 > This works with SELECT, but a syntax error is encountered when used with DELETE.
 > 
 > Is it impossible to specify more than one table in DELETE's ?
 > 
 > 
 > 


No, it is not, but such a DELETE will appear in MySQL 4.0 branch,
which is already in the works.

Regards,

Sinisa

+----------------------------------------------------------------------+
|      ____  __     _____   _____  ___     ==  MySQL AB                |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped     |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+
Thread
Joins in DELETE; Impossible?Johan Andersson6 Oct
  • Re: Joins in DELETE; Impossible?sinisa6 Oct