Posted by: Pdfprep
Post Date: February 18, 2021
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})
Answer: A
Leave a Reply