我想从我的WordPress网站 删除重复的职位选择重复的岗位工作currectlly删除重复的帖子在WordPress
SELECT a.ID, a.post_title, a.post_type, a.post_status
FROM wp_posts AS a
INNER JOIN (
SELECT post_title, MIN(id) AS min_id
FROM wp_posts
WHERE post_type = 'post'
AND post_status = 'publish'
GROUP BY post_title
HAVING COUNT(*) > 1
) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = 'post'
AND a.post_status = 'publish'
和
this query that i need has error
DELETE a.*
FROM wp_posts AS a
INNER JOIN (
SELECT post_title, MIN(id) AS min_id
FROM wp_posts
WHERE post_type = 'post'
AND post_status = 'publish'
GROUP BY post_title
HAVING COUNT(*) > 1
) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = 'post'
AND a.post_status = 'publish'
这是错误消息:
意外标记(接近a)意外标记(接近。)意外标记 (接近*)
请标记正确使用的RDBMS .....语法可能会有所不同? – Susang