Which command creates a simple index on the 'name' field in MongoDB? - Study24x7
Social learning Network
5 followers study24x7 19 Dec 2024 12:44 PM study24x7 study24x7

Which command creates a simple index on the 'name' field in MongoDB?

A

db.collection.createIndex({name: 1})

B

db.collection.index({name: 1})

C

db.collection.addIndex({name: 1})

D

db.collection.setIndex({name: 1})

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles