Skip to content

Instantly share code, notes, and snippets.

@psorensen
Forked from BFTrick/sql-command.sql
Created August 13, 2014 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psorensen/cee1023dbce7fd220232 to your computer and use it in GitHub Desktop.
Save psorensen/cee1023dbce7fd220232 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