OPTIONS

db.collection.drop()

db.collection.drop()

Call the db.collection.drop() method on a collection to drop it from the database. The method provides a wrapper around the drop command.

db.collection.drop() takes no arguments and will produce an error if called with any arguments.

This method also removes any indexes associated with the dropped collection.

Warning

This method obtains a write lock on the affected database and will block other operations until it has completed.

ON THIS PAGE