show collections

Reference type:Cheat sheetFormat:Syntax + example + use case

Reference group: Database and collection discovery

What it does

mongosh helper listing collections in the current database.

Syntax

show collections

Use case

Inspect collection names while debugging.

show collections: practical example
show collections
💡 Explanation mongosh helper listing collections in the current database. When to use it Inspect collection names while debugging.
Key Takeaways
  • mongosh helper listing collections in the current database.
  • Typical use: Inspect collection names while debugging.