MongoDB Database Commands

To read about MongoDB, please click here.
To know about terms used in MongoDB, please click here.
For a sample MongoDB dataset, please click here.

In this article, we will be discussing the list of the commands that are used against the databases in MongoDB.

To get the list of all databases.
show dbs

To create a new database.
use DATABASE_NAME

To know current selected database
db

To drop a database
db.dropDatabase()

Hope you find this article helpful.

Please subscribe for more interesting updates.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s