drop() - Drop a collection command

Drops a collection and associated objects, such as indexes on the collection.

Syntax diagram

Read syntax diagramSkip visual syntax diagramdb.collection. drop()

Command parameters

None

Example

Drop the books collection:
db.books.drop()
Sample output is as follows:
OK