title: How to delete posts without featured images in wordpress via mysql?
body: <p>How can posts without featured-images be removed via mysql in wordpress ?</p>
  
  <p>I tried this code but it delete all posts which include featured-images also. I just want to remove posts only that without featured-images.</p>
  
  <pre><code>DELETE FROM wp_posts WHERE ID not in (select post_id as p from wp_postmeta where meta_key like "_wp_attached_file")
  </code></pre>