

InterviewSolution
Saved Bookmarks
1. |
Which of the following method returns one document?(a) findOne()(b) findOne1()(c) selectOne()(d) all of the mentionedThe question was asked during a job interview.I'd like to ask this question from Read Operations topic in portion MongoDB CRUD Concepts and Operation of MongoDB |
Answer» CORRECT CHOICE is (a) findOne() For explanation: MongoDB provides a db.collection.findOne() method as a SPECIAL case of FIND() that RETURNS a single document. |
|