1. Home
  2. MongoDB
  3. MongoDB Tutorial
  4. MongoDB – Show Collection

MongoDB – Show Collection

MongoDB Show Collection

Use show collections command from MongoDB shell to list all collection created in the current database. First, select the database you want to view the collection.

MongoDB Show Collection
Select mydb database and run show collections command to list available collections in MongoDB database.

> use mydb
> show collections

Output:

TECADMIN
accounts
mycol
pproducts
users
Tags , ,
Was this article helpful to you? Yes 11 No 9
Advertisement