Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Shell/Bash
mongodb shell query last document
Gendarme
Programming language:
Shell/Bash
2021-06-25 22:49:35
0
Q:
mongodb shell query last document
David
Code:
Shell/Bash
2021-03-29 23:51:09
db.collection.find().limit(1).sort({$natural:-1})
2
Tags
shell
mongodb
last
Related
list all collections in the MongoDB shell
how to print more than 20 documents mongo shell
print value mongodb shell
mongo shell commands
mongo shell load
New to Communities?
Join the community