新增:
db.getCollection('snacks').update({},{'$set':{'is_del':0}},false, true)
刪除字段
db.getCollection('snacks').update({},{'$unset':{刪除字段:‘’}},false, true)
新增:
db.getCollection('snacks').update({},{'$set':{'is_del':0}},false, true)
刪除字段
db.getCollection('snacks').update({},{'$unset':{刪除字段:‘’}},false, true)
【mongo 系列】mongodb 學習六,索引淺析 阿兵雲原生 2021-10-07 1,787 閱讀5分鐘 專欄: 開源組件專題