MongoDB – Select Document:

In MongoDB, we can retrieve all documents in a collection by using the below command. This will retrieve all the documents with in the collection.


Both of the above queries will work in same way. Also, you can use several other methods and conditions while retrieving the documents in a collection as per the requirement.