I need to remove/delete slug of posts on pending via phpMyAdmin. Most of posts on pending have slug/URL which is different from their post title, deleting post slug/URL will force WP to generate new slug when post is published (which will be then as post title).
Just for test, I tried manually to delete slug from some posts on pending via phpMyAdmin, and than to publish it via WP, and new slug is generated from post title. Now, I just need SQL function/query for that.
So, I need to delete slug only from posts and only from posts on pending.
I think it should be something like this:
UPDATE wp_posts SET post_name = '' WHERE post_status = 'pending' AND post_type = 'post';
Could someone verify that please (or fix it if needed)?