1. 大于 $gt
db.collection.find({ “field” : { $gt: value } } );
2. 小于 $lt
db.collection.find({ “field” : { $lt: value } } );
3. 大于或等于$gte
db.collection.find({ “field” : { $gte: value } } );
4. 小于或等于$lte
db.collection.find({ “field” : { $lte: value } } );
5. 不等于 $ne
db.collection.find( { “field” : { $ne : value } } );
© 版权声明
博主的文章没有高度、深度和广度,只是凑字数。利用读书、参考、引用、抄袭、复制和粘贴等多种方式打造成自己的纯镀 24k 文章!如若有侵权,请联系博主删除。
喜欢就点个赞吧