There is a query that successfully returns the result:
SELECT * FROM tbl_article_tags t1 WHERE tag_id = '16256' AND EXISTS(SELECT 1 FROM tbl_article_tags t2 WHERE t1.article_id=t2.article_id AND tag_id = '17000') Replaced SELECT * with DELETE , now throws an error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't1 WHERE tag_id = '16256' ' at line 1 Does anyone have any idea why?
t1.article_id=t2.article_id AND tag_id = '17000'because there is certainly one entry with this article_id and tag_id = 17000 - Mike