MongoDB
C100DBA · Question #100
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 ret
Sign in or unlock C100DBA to reveal the answer and full explanation for question #100. The question stem and answer options stay visible for context.
MongoDB Fundamentals
Question
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?
Options
- Adb.posts.finOne({},{_id:0, post_text:1})
- Bdb.posts.findOne({post_text: 1})
- Ddb.posts.finOne«},{post_text:l})
Unlock C100DBA to see the answer
You've previewed enough free C100DBA questions. Unlock C100DBA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#findOne#projection#field selection#_id exclusion