翻译或纠错本页面
- Reference >
- mongo Shell Methods >
- Collection Methods >
- db.collection.drop()
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.
警告
This method obtains a write lock on the affected database and will block other operations until it has completed.