创建、更新、删除文档(mongodb权威指南)

2017-03-28 15:23

1.插入并保存文档

命令

db.collection.insertOne()    Inserts a single document into a collection.
db.collection.insertMany()    db.collection.insertMany() inserts multiple documents into a collection.
db.collection.insert()    db.collection.insert() inserts a single document or multiple documents into a collection.