Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: How can you create an index in MongoDB?
Answer: You can create an index in MongoDB using the `createIndex` method. For example, `db.collection.createIndex({ field: 1 })` creates an ascending index on the specified field.
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook