首页 > 数据库技术 > 详细

MongoDB学习

时间:2015-10-19 16:56:09      阅读:280      评论:0      收藏:0      [点我收藏+]

查找表中 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%‘

MongoDB学习

原文:http://www.cnblogs.com/fery/p/4892242.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!