2015-08-13

MongoDB - How to remove all documents (row) from a collection (table)

db.COLLECTION_NAME.remove({});

// This works only on version 2 and below (no document being passed).
db.COLLECTION_NAME.remove();

No comments:

Post a Comment