নির্দিষ্ট ডাটাবেস থেকে সব কালেকশন দেখতে হলে প্রথমে সেই ডাটাবেসে স্যুইচ করতে হয়। কোয়েরিটি নিচে দেওয়া হলো:
> use sample; switched to db sample > db.getCollectionNames();
আউটপুট:
[
"copyThisCollectionToSampleDatabaseDemo",
"deleteDocuments",
"deleteDocumentsDemo",
"deleteInformation",
"employee",
"internalArraySizeDemo",
"sourceCollection",
"updateInformation",
"userInformation"
]
বিকল্পভাবে show collections; কমান্ডও ব্যবহার করা যায়।
> show collections;
আউটপুট:
copyThisCollectionToSampleDatabaseDemo deleteDocuments deleteDocumentsDemo deleteInformation employee internalArraySizeDemo sourceCollection updateInformation userInformation