Docs Menu

Docs HomeView & Analyze DataMongoDB Shell

Perform CRUD Operations

On this page

  • Create Operations
  • Read Operations
  • Update Operations
  • Delete Operations

CRUD operations create, read, update, and delete documents.

Create or insert operations add new documents to a collection. If the collection does not exist, create operations also create the collection.

You can insert a single document or multiple documents in a single operation.

For examples, see Insert Documents.

Read operations retrieve documents from a collection; i.e. query a collection for documents.

You can specify criteria, or filters, that identify the documents to return.

For examples, see Query Documents.

Update operations modify existing documents in a collection. You can update a single document or multiple documents in a single operation.

You can specify criteria, or filters, that identify the documents to update. These filters use the same syntax as read operations.

For examples, see Update Documents.

Delete operations remove existing documents from a collection. You can remove a single document or multiple documents in a single operation.

You can specify criteria, or filters, that identify the documents to remove. These filters use the same syntax as read operations.

For examples, see Delete Documents.

← Run Commands