MongoDB学习

查找表中 t 时间字段大于 ‘2015-10-01 10:10:10’ 且小于‘2015-10-15 10:10:10’ 且在存在 x字段 且 x字段值 包含'abc'的所有行

{

"t": {"$gt": "2015-10-01 10:10:10", "$lt":"2015-10-15 10:10:10"},

"x": {"$ne": null, "$exists":true, "$regex": '.abc.', "$options": 'i'}

}

类似:select * from mongodb.collections where t>'2015-10-01 10:10:10' and t<'2015-10-15 10:10:10' and x <> null and x like '%abc%'

posted on 2015-10-19 16:26  fery  阅读(130)  评论(0编辑  收藏  举报