MCQs > IT & Programming > MongoDB > Assuming you have customers collection with a firstName and lastName field, which is the correct MongoDB shell command to create an index on lastName, then firstName both ascending?

MongoDB MCQs

Assuming you have customers collection with a firstName and lastName field, which is the correct MongoDB shell command to create an index on lastName, then firstName both ascending?

Answer

Correct Answer: Db.customers.createIndex({lastName:1, firstName: 1})

Explanation:

Note: This Question is unanswered, help us to find answer for this one

MongoDB Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

MongoDB Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it