Skip to content

Instantly share code, notes, and snippets.

@vanduc1102
Created January 8, 2016 09:34
Show Gist options
  • Save vanduc1102/ec4da3e49f5f08bcd165 to your computer and use it in GitHub Desktop.
Save vanduc1102/ec4da3e49f5f08bcd165 to your computer and use it in GitHub Desktop.
MongoDB Basic Commands
# connect to mongodb with db name is xdsb
mongo xdsb
# show all collections
show collections()
# find by id
db.collection_name.find({_id:'id'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment