您的位置:首页 > 数据库 > Mongodb

MongoDB学习

2015-10-19 16:26 519 查看
查找表中 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%'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: