Run the below SQL command in phpMyAdmin.  Replace portion CODE_TO_SEARCH with the code you want removed.  Make sure database table prefix matches the site you are doing this on.


update wp_posts set post_content =
replace(post_content,'Text to find','text to replace with');


ANOTHER WAY BELOW:

phpMyAdmin includes a neat find-and-replace tool.

Select the table, then hit SearchFind and replace

This query took about a minute and successfully replaced several thousand instances of oldurl.ext with the newurl.ext within Column post_content

screenshot of the find-and-replace feature in phpMyAdmin