Skip to content

Commit 74176cc

Browse files
Merge pull request #6 from Meg528/patch-8
Update 4-INSERT-DELETE.mdx
2 parents 7e64eba + 72a740e commit 74176cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/40-CRUD/4-INSERT-DELETE.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
MongoDB provides two methods for inserting documents into a collection:
44

5-
- `.insertOne()`: Inserts a single document.
6-
- `.insertMany()`: Inserts multiple documents at once.
5+
- `.insertOne()`: Inserts a single document
6+
- `.insertMany()`: Inserts multiple documents at once
77

8-
And just like insert MongoDB provides:
8+
And just like insert, MongoDB provides:
99

1010
- `.deleteOne()`: Deletes the first matching document.
1111
- `.deleteMany()`: Deletes all matching documents.
@@ -21,7 +21,7 @@ db.reviews.insertOne({
2121
});
2222
```
2323

24-
### Equivalent SQL Query
24+
### Equivalent SQL query
2525

2626
```sql
2727
INSERT INTO reviews (text, rating, name, bookId)
@@ -55,7 +55,7 @@ db.reviews.deleteOne({
5555
});
5656
```
5757

58-
### Equivalent SQL Query
58+
### Equivalent SQL query
5959

6060
```sql
6161
DELETE FROM reviews WHERE bookId = '0786222727';

0 commit comments

Comments
 (0)