Skip to content

Instantly share code, notes, and snippets.

@Silfen
Last active December 14, 2017 19:53
Show Gist options
  • Save Silfen/ee989a0bd26faf5b6686 to your computer and use it in GitHub Desktop.
Save Silfen/ee989a0bd26faf5b6686 to your computer and use it in GitHub Desktop.
Mongo

Select database

use database

Show collections

show collections

Remove

db.myCollection.remove({"_id":ObjectId('56c72937c5ca473b381c8160')})

Update

db.myCollection.update({}, {$set: {hashtag: 'todo'}}, {multi: true})

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