Skip to content

Instantly share code, notes, and snippets.

@BenSlabbert
Created January 3, 2019 12:48
Show Gist options
  • Save BenSlabbert/462b199946ad1705b9bdfbce42bd3bcb to your computer and use it in GitHub Desktop.
Save BenSlabbert/462b199946ad1705b9bdfbce42bd3bcb to your computer and use it in GitHub Desktop.
update many mongo set multi: true to update many records matching the selector
db.vehicles.update({}, {$set: {dateCreated: Date.now()}}, {multi:true})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment