Skip to content

Instantly share code, notes, and snippets.

@dizda
Created May 4, 2013 23:24
Show Gist options
  • Save dizda/5519127 to your computer and use it in GitHub Desktop.
Save dizda/5519127 to your computer and use it in GitHub Desktop.
MongoDB Add field to all documents without criteria
db.TheCollection.update({}, {$set:{'parent':true}}, {multi:true});
// {} = empty selector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment