Navigation

    Perform CRUD Operations

    Beta

    MongoDB Shell is currently available as a Beta release. The product, its features, and the corresponding documentation may change during the Beta stage.

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

    Create Operations

    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

    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

    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

    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.