469,955 Members | 2,606 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,955 developers. It's quick & easy.

multiple table delete query error

Ray
Hello all,

I am attempting to delete multiple rows from multiple tables as
follows:

DELETE FROM attachments,responses,response_lines WHERE attachments.id
IN(2,7,11) AND responses.attachment_id=attachments.id AND
response_lines.response_id=responses.id

The error message it returns is:

MySQL Error: You have an error in your SQL syntax near
'responses,response_lines WHERE attachments.id IN(2,7,11) AND
responses.attachment_id=' at line 1

I have tried every construct described at
http://www.mysql.com/doc/en/DELETE.html and always receive the same
error.

Any suggestions?

-r
Jul 19 '05 #1
1 3009
Ray wrote:
Hello all,

I am attempting to delete multiple rows from multiple tables as
follows:


What version of MySQL are you using?

"The first multiple-table delete format is supported starting from MySQL
4.0.0. The second multiple-table delete format is supported starting
from MySQL 4.0.2"

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ray | last post: by
9 posts views Thread by Ed_No_Spam_Please_Weber | last post: by
5 posts views Thread by Robert Brown | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.