主题
db.collection.insertOne() 将单个文档插入集合中。
db.collection.insertOne()
db.inventory.insertOne( { item: "canvas", qty: 100, tags: ["cotton"], size: { h: 28, w: 35.5, uom: "cm" } } )
insertOne() 返回一个文档,其中包含新插入的文档的 _id 字段值。
insertOne()
_id
db.collection.insertMany() 将多个文档插入集合中。
db.collection.insertMany()