Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
如题,先在我用一个存在重复数据的集合,有没有办法为这个集合建立唯一索引?
@Jerry
db.coll.createIndex({ field1 : 1 , field2 : 1 },{ unique: 1 })
新版不允許 unique index 在重複情況下建立
因為他也不知道重複資料要怎麼處理
所以清除重複後再建吧
与 萌阔论坛 的连接断开,我们正在尝试重连,请耐心等待