I used SQL开发者_StackOverflow社区 query to delets more a 1K posts from my WordPress db. Now my db is left with thousands of tags not being used by any post.
Can someone plese help me with a SQL Query that will delete all tags from the tags table that has no post in the posts table?
Thanks You Neeraj
Something along the lines of:
delete Tags
where Id not in
(
select TagID
from Posts
where TagID is not null
)
Could be more specific if you posted the table definitions.
精彩评论