Suppose we have a collection, "Students", with one document preexisting:
{ "_id" : 100, "name" : "Student1", "age" : 12, "subject" : "biology" }

Which of the following statements would set the available field to 1?

 Posted by Rajnilari2015 on 3/23/2016 | Category: NoSql Interview questions | Views: 883 | Points: 40
Select from following answers:
  1. db.Students.update({},{$inc:{available:true}})
  2. db.Students.update({_id:100},{$set:{available:1}})
  3. db.Students.update({_id:100, $set:{available:1}})
  4. None of the above
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response