Skip to content

Instantly share code, notes, and snippets.

@n1k1c4
Created December 8, 2017 10:31
Show Gist options
  • Save n1k1c4/46be618335dfa8f4e3689ac806c393a9 to your computer and use it in GitHub Desktop.
Save n1k1c4/46be618335dfa8f4e3689ac806c393a9 to your computer and use it in GitHub Desktop.
DELETE pm
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment