mongo 查询sql
1. 模糊查询
db.city.find({"region":/^new/}) #region字段以new字符串开始的记录
2. 大小比较
db.collection.find({ "field" : { $gt: value } } ); // greater than : field > value
db.collection.find({ "field" : { $lt: value } } ); // less than : field < value
db.collection.find({ "field" : { $gte: value } } ); // greater than or equal to : field >= value
db.collection.find({ "field" : { $lte: value } } ); // less than or equal to : field <= value
浙公网安备 33010602011771号