Skip to content

Instantly share code, notes, and snippets.

@wytten
Created March 26, 2014 19:12
Show Gist options
  • Select an option

  • Save wytten/9790969 to your computer and use it in GitHub Desktop.

Select an option

Save wytten/9790969 to your computer and use it in GitHub Desktop.
MongoDB update all
db.scores.update({}, {$set:{score:77}}, {multi:true});
@wytten

wytten commented Mar 26, 2014

Copy link
Copy Markdown
Author

Point being that only 1 record will be updated if you omit the multi:true option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment