Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyMongoDBsingle-field indexesSingle-choice MCQ

You run createIndex({ email: 1 }) on a collection that already has two documents with the same email value. What happens?

db.users.createIndex({ email: 1 })