Answer Posted / Priyanka Choudhary
To create an index in MongoDB, you can use the 'createIndex()' method. For example, to create an index on the '_id' field of a collection named 'users', you would execute db.users.createIndex({'_id': 1}).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers