如何在mongoDB里创建集合
1、打开终端窗口。

2、sudo service mongod start开启服务。

3、输入mongo进入mongodb。

4、use 数据库名,这样可以创建数据库。

5、db.createCollection("")
创建集合。

6、db.集合.drop()
删除集合。

7、db.createCollection().count()查询记录条数。

8、show collections
查看所有集合。

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:141
阅读量:89
阅读量:113
阅读量:82
阅读量:22