Skip to content

Latest commit

 

History

History
executable file
·
7 lines (5 loc) · 222 Bytes

021-useful-mongo-db-commands.md

File metadata and controls

executable file
·
7 lines (5 loc) · 222 Bytes

Useful MongoDB commands

  1. Update all documents in a collection - set undefined (null) properties to some value:
db.collection_name.update( { "prop1" : null }, { $set: { "prop1" : [] } }, { multi : true } );