MongoDB 8 · Create, read, update, delete

Insert a document

Add one document to a collection.

db.users.insertOne({ name: "Ada", email: "[email protected]", age: 36 })

Official MongoDB 8 documentation

More create, read, update, delete commands

All create, read, update, delete commands · MongoDB 8 cheatsheet

Was this page helpful?