2015-08-13

MongoDB - Count records matching a given filter criteria

db.COLLECTION_NAME.find({FIELD_NAME:'VALUE_TO_MATCH'}).count();

OR

db.COLLECTION_NAME.count({FIELD_NAME:'VALUE_TO_MATCH'});

No comments:

Post a Comment