只显示某一字段:
db.extra_third_2_2.find({},{name:1});
删除字段:
db.extra_third_2_2.remove({"name":null});
导出某一个collection:
/usr/local/app/mongodb/bin/mongoexport -h host:port -d db_name -c collection
参数说明
-h:指明数据库宿主机的IP
-u:指明数据库的用户名
-p:指明数据库的密码
-d:指明数据库的名字
-c:指明collection的名字
-f:指明要导出那些列
-o:指明到要导出的文件名
-q:指明导出数据的过滤条件

7274

被折叠的 条评论
为什么被折叠?



