Black Friday Reward - Upto 75% off - Ends in 0d 00h 00m 00s - Coupon code: CFsave75

MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) C100DBA Question # 2 Topic 1 Discussion

MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) C100DBA Question # 2 Topic 1 Discussion

C100DBA Exam Topic 1 Question 2 Discussion:
Question #: 2
Topic #: 1

Consider a collection posts which has fields: Jd, post_text, post_author, post_timestamp, post_tags etc. Which of the following query retrieves ONLY the key named post_text from the first document retrieved?


A.

db.posts.finOne({},{_id:0, post_text:1})


B.

db.posts.findOne({post_text: 1})


C.

db.posts.find({},{_id:Of post_text:1})


D.

db.posts.finOne«},{post_text:l})


Get Premium C100DBA Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.