2015-12-03

MongoDB - Unique compound index creation

db.COLL_NAME.createIndex(  
   {  
       FIELD_NAME : 1
       , FIELD_NAME_2: 1  
   }
   , { unique: true }  
);
 

No comments:

Post a Comment