Say you have hundreds or even thousands of posts within your database, and you need to make site-wide global changes. Making each edit, via the WordPress Dashboard, can be time-consuming and does open up the possibility of mistakes occurring. If you do need to make global edits, then it’s time to roll up your sleeves and delve directly into the WordPress MySQL database.
A bunch of handy SQL queries for managing WordPress databases. The queries are not particularly exotic, but it’s a handy reference.