Write command to add record {"name": Max} to collection coll
db.coll.insertOne({name: "Max"})Write command to add ordered bulk of records:
- {"name": Max}
- {"name": Alex}
to collection coll
db.coll.insertMany([
{name: "Max"},
{name:"Alex"}
])
or
~~~
db.coll.insertMany([
{name: “Max”},
{name:”Alex”}
], {ordered: true})
~~~
ordered bulk insert