Mongo Shell

Insert

  • Insert syntax

    • insertOne: insert a one single document

    • insertMany: insert multiple documents

collection.insertOne(<document>)
collection.insertMany([<docuemtn1>, <document2>, ...])
collection.insert(<document>)

Last updated