Suppose we want to insert a document into the Student collection with the attributes of "name" being "Student1" , "age" being "12", and "class" being "8". What will be the command for that from the MongoDB shell?

 Posted by Rajnilari2015 on 3/22/2016 | Category: NoSql Interview questions | Views: 744 | Points: 40
Select from following answers:
  1. db.Student.insert({ name: "Student1", age: "12", class: "8" })
  2. db.Student.update({ name: "Student1", age: "12", class: "8" })
  3. db.Student.find({ name: "Student1", age: "12", class: "8" })
  4. db.Student.upsert({ name: "Student1", age: "12", class: "8" })
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response