Set col data
{
"name" : "xiaoming"
"school" : "6",
}
{
"name" : "xiaohong"
"school" : "10",
}
{
"name" : "xiaoqiang"
"school" : "1",
}
For example, how to change all school to 5?
Looking around online, no one mentioned how to change the data segment to the same data.
Can only ask the great god advice.
db.col.update({}, {$set: {school: "5"}}, {multi: true})