linux下MongoDB查询操作

cd /home/app/mongodb-linux-x86_64-2.4.9/bin/
./mongo
//使用该表
use msgall;
//显示行
DBQuery.shellBatchSize = 50000;
//查询方法,前者为参数,后者为是否显示,0不显示,1显示
db.msgall.find({"code":"批次号1","status":"0"} ,{code:1,cid:1,content:1,status:1});
db.msgall.find({"code":"批次号2","status":"0"} ,{code:1,cid:1,content:1,status:1});
db.msgall.find({"code":"批次号3","status":"0"} ,{code:1,cid:1,content:1,status:1});
exit;


 
 

你可能感兴趣的:(DB)