Drop posts from categories in MySql

Is there a way to remove all posts from all categories?
I found plugin for this, but it’s very slow. What I need is MySql query that will help me remove all posts from all categories.
If you know how to implement the same code, but only to specific category, that would be useful to have for reference too. So how to disassociate all post that belong to one category from all categories (therefore they will belong only to default ‘uncategorized’ category).
Thanks a lot.

Related posts

Leave a Reply

1 comment

  1. Have you tried just deleting all the categories in Posts > Categories? When you delete a category, it only deletes the category and NOT the posts. All the posts will then default to uncategorized.