MongoDB deletes a field in the table

class:MongoDB views:109 Author:xiaomo314
Command
db.cninfo2006.update({"fieldname":{$exists: true} },{$unset:{"fieldname":1}},false,true);
Explanation
{"fieldname":{$exists: true}} : query condition
{$unset:{"fieldname":1}} : update object and some update operators
false : If there is no update record, whether to insert the new document objNew, true is inserted, the default is false, not inserted.
true : Update all the records queried by the condition.
Operation result
Updated 7517 existing record(s) in 2336ms

This platform is gradually under construction, more development orders are gradually included, any questions or Suggestions can be Contact Us