命令使用mongo shell 执行 1.mongo中增加新字段 mongo shell 进入后执行use table选中要添加字段的库 db.getCollection('表名').update({}, {$set: {filed1:"",filed2:0}}) 来源:https://www.cnblogs.com/luqiang213917/p/11764330.html 标签 mongo shell