Back
In the MongoDB shell, how do I list all collections for the current database that I'm using?
You can use the below-mentioned query to list all collections in the mongo shell:-
db.getCollectionNames()
Just type the following code in the mongo executable file:
31k questions
32.8k answers
501 comments
693 users