Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Delete one document

db.my_colelction.deleteOne({ field1: "value1" })

Delete multiple documents

db.my_colelction.deleteMany({ field2: 99 })

Delete all documents

db.my_colelction.deleteMany({})

Find and Delete

Finds a document, deletes it, and returns the deleted document

db.my_colelction.findOneAndDelete({ field1: "value1" })