From 041a50547541e1012487b6d4c22c21e7cbab7e57 Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 22 May 2024 01:03:38 +0530 Subject: [PATCH] Update mongodb1.md --- docs/DBMS/mongodb1.md | 50 ------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/docs/DBMS/mongodb1.md b/docs/DBMS/mongodb1.md index 8155ed9..ee2c44e 100644 --- a/docs/DBMS/mongodb1.md +++ b/docs/DBMS/mongodb1.md @@ -4,56 +4,6 @@ title: mongodb1 parent: DBMS --- -## Basic Commands - -1. show database -```shell -show databases -``` - -2. switch database -```shell -use -``` - -3. show collections -```shell -show collections -``` - -4, Create collection -```shell -db.createCollection('NewCollection') -``` - -5. insert document -```shell -db..insertOne({}) -``` - -```shell -db.myCollection.insertMany([ - { name: "Charlie", profession: "Doctor" }, - { name: "Diana", hobby: "Photography" } -]) -``` - -6. delete collection - -```shell -db.exam_collection.deleteOne({ name: "Alice" }) -``` - -```shell -db..deleteMany({ name: "Alice" }) -``` - -7. Drop collection (caution) - -```shell -db..drop() -``` - ## Curd operations ```shell