MongoDB 显示所有集合中的所有内容 [英] MongoDB Show all contents from all collections
本文介绍了MongoDB 显示所有集合中的所有内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在 MongoDB 中显示所有集合及其内容?
Is it possible to show all collections and its contents in MongoDB?
只能一一展示吗?
推荐答案
进入终端/命令行后,按如下方式访问要使用的数据库/集合:
Once you are in terminal/command line, access the database/collection you want to use as follows:
show dbs
use <db name>
show collections
选择您的收藏并键入以下内容以查看该收藏的所有内容:
choose your collection and type the following to see all contents of that collection:
db.collectionName.find()
有关 MongoDB 快速参考指南的更多信息.
这篇关于MongoDB 显示所有集合中的所有内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文