我有2个查询 - DELETE FROM和DELETE A FROM我正在尝试将它们组合成一个查询,我尝试了几种方法,但我仍然遇到语法错误:
DELETE A FROM wp_posts AS a INNER JOIN ( SELECT post_content, MIN( id
) AS min_id FROM wp_posts WHERE post_type = 'post' AND post_status =
'publish' GROUP BY post_content HAVING COUNT( * ) > 1 ) AS b ON
b.post_content = a.post_content AND b.min_id <> a.id AND a.post_type =
'post' AND a.post_status = 'publish'
DELETE FROM wp_posts WHERE `post_title` like '%.png%'