如何在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。
阅读量:44
阅读量:36
阅读量:30
阅读量:47
阅读量:22