db.lessons.find({}, {slides:0});
db.bios.find( { }, { name: 1, contribs: 1, _id: 0 } )
db.wemessages.find( {$and: [ { CreateTime: {$gt: (startTime.getTime()/1000).toString()} }, { CreateTime: {$lt: (endTime.getTime()/1000).toString()} }, { Content: {$in: [‘1‘,‘2‘,‘3‘,‘4‘,‘5‘]} } ]} );
db.lessons.update({}, {$set:{‘course_id‘:‘c.101‘}});
db.lessons.update({}, {$set:{‘course_id‘:‘c.101‘}}, {multi: true}); db.muusers.update({username: ‘tom‘}, {$set: {mobile: ‘6508639713‘}}, {multi: true});
db.muusers.find().sort({firsttime: -1});
db.lessons.find({lesson: 1}, {slides: 0, mp3voice:0, wavvoice:0, wavvoicemin: 0}).pretty();
db.questions.find({‘sequence_id‘: 1, ‘pngslide‘: {$exists: false}}); db.mycollection.find( { "price" : { "$exists" : false } } )
db.translation_memory.find({mp3voice: {$exists: false}}, null, {limit: 100});
db.collection.remove();
db.lessons.find({lesson: 1}).toArray()[0].slides.join(‘‘).length
db.quizzes.renameCollection(‘questions‘);
db.questions.update({}, {$unset: {quiz_name:1}}, {multi: true}); db.learning_progress.update({}, {$unset: {lesson:1}}, {multi: true}); db.lessons.update({}, {$unset: {wavvoice:1, wavvoicemin:1}}, {multi: true});
db.students.update( { _id: 1 }, { $rename: { ‘nickname‘: ‘alias‘, ‘cell‘: ‘mobile‘ } } )
2MongoDB入门教程(包含安装、常用命令、相关概念、使用技巧、常见操作等)
8MongoDB入门教程之细说MongoDB数据库的增删查改操作
10MongoDB入门教程之Windows下的MongoDB数据库安装图解
11MongoDB查询字段没有创建索引导致的连接超时异常解案例分享
30MongoDB教程之聚合(count、distinct和group)
39MongoDB系列教程(六):java操作mongodb实例
40MongoDB系列教程(七):MongoDb数据结构详解
41MongoDB系列教程(五):mongo语法和mysql语法对比学习
45MongoDB系列教程(三):Windows中下载和安装MongoDB
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/hello_katty/article/details/46691069