MongoDB Drop Collection example - Java @ Desk

Monday, May 19, 2014

MongoDB Drop Collection example

MongoDB Drop Collection example

To drop a collection i.e. delete the complete collection as well as remove all the indexes use the below command

db.collection.drop()


This method do not take any argument. It also applies lock on the database and other operations will be in wait state until this gets finished.






No comments:

Post a Comment