免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Deleting documents in MongoDB
- Hi folks. In this video, you'll learn how to delete documents in MongoDB by using deleteOne() and deleteMany(). Let's jump right into it. Imagine that you're working with a database that contains information about various podcasts. There's a single document for each podcast that gets added to the collection, which is called Podcasts, but there's a problem. At some point, a duplicate document for a podcast was inserted accidentally. We need to delete the duplicate. To achieve this, first, we'll use find() to determine which document to delete, and then we'll use the deleteOne() method. Furthermore, your managers ask you to remove all podcasts with a category of crime. First, we provide a filter document to the find() method that contains the uploaded date of the duplicate document which was provided to us by our manager. The date we were given is April 28th, 2020. In the Shell, we'll use the ISODate wrapper to…
内容
-
-
-
-
-
-
Replacing a document in MongoDB3 分钟 15 秒
-
(已锁定)
Updating MongoDB documents by using updateOne()5 分钟 56 秒
-
(已锁定)
Updating MongoDB documents by using findAndModify()2 分钟 35 秒
-
(已锁定)
Updating MongoDB documents by using updateMany()3 分钟 2 秒
-
(已锁定)
Deleting documents in MongoDB2 分钟 37 秒
-
(已锁定)
MongoDB CRUD operations: Replace and delete documents review44 秒
-
-
-
-
-
-
-
-