Mention what is the basic syntax to use index in mongodb?
Answer Posted / Deepshikha Singh
The basic syntax to create an index in MongoDB is: `db.collection.createIndex( { field1: -1 } `. This creates an ascending index on `field1`.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers