MongoDB Show Collection
Use the show collections command from MongoDB shell to list all collections created in the current database. First, select the database you want to view the collection.
Mongodb Show Collection
Select your database and run the show collections command to list available collections in the MongoDB database.
Output:
Get Collections Information
To find detailed information about the database collections use .getCollectionInfos() function. This will provide an array of documents with collection information, such as names and options.
You can also use filters with the above commands, for example, to fetch the details of the specific collection with their name use the following command:
Output:
0 Comments
CAN FEEDBACK
Emoji