What is a one line mysql query that can update all body fields of matched nodes?
In drupal 7 it is a bit simpler.
You don't need the join.

UPDATE field_data_body
   SET body_value = 'This is my string.'
 WHERE entity_type = 'node'
   AND bundle = 'basic_page';


You must clear the drupal cache after updating content directly in the database.

Also, if you are using revisions, note that you have just changed the latest revision without creating a new revision.
This may not matter to you but it's worth noting.