Q:

In our posts collection, which command can be used to find all the posts whose author names begin lie between \"A\" and \"C\" in dictionary order?

0

In our posts collection, which command can be used to find all the posts whose author names begin lie between \"A\" and \"C\" in dictionary order?


  1. db.posts.find( { post_author : { $gte : \"A\" , $lte : \"C\" } } );
  2. db.posts.find( { post_author : { $gte : \"C\" , $lte : \"A\" } } );
  3. db.posts.find( { post_author : { $gt : \"A\" , $lt : \"C\" } } );
  4. This type of search is not supported by MongoDB. $lt and $gt operators are applicable only for numeric values.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:

A.db.posts.find( { post_author : { $gte : "A" , $lte : "C" } } );

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now