Cheat sheet¶
Last updated on: 19 January, 2020
Compiled by: Evan Tay
The purpose of this page is to summarise key mongodb
commands you will always use.
Print a collection's documents¶
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Delete documents¶
1 2 3 4 5 6 7 8 9 10 |
|
Resources¶
- MongoDB's official guide to
mongo
Shell Quick Reference:
https://docs.mongodb.com/manual/reference/mongo-shell/ - MongoDB's official guide to
db.collection.remove()
:
https://docs.mongodb.com/manual/reference/method/db.collection.remove/