Quantcast
Channel: DigitalOcean Community Tutorials
Viewing all articles
Browse latest Browse all 136

MongoDB findOne() Example using Mongo Shell and Java Driver

$
0
0
The findOne() method returns only one document that satisfies the criteria entered. If the criteria entered matches for more than one document, the method returns only one document according to natural ordering which reflects the order in which the documents are stored in the database. MongoDB findOne() syntax is: db.collection.findOne(<criteria>, …

Viewing all articles
Browse latest Browse all 136

Trending Articles