You often need to see a list of collections contained in a database—for example, to verify that a collection exists or to find the name of a collection that you cannot remember. To see a list of collections in a database, you need to switch to that database and then use show collections
to get the list of collections contained in the database. For example, the following commands list the collections in the test
database: