DEV Community

yaswanthteja
yaswanthteja

Posted on

 

All MongoDb Database commands (MongoDb Cheatsheet)

In this post, we will see a comprehensive list of all the MongoDB commands you will ever need as a MongoDB beginner. This list covers almost all the most used commands in MongoDB.

Database Commands

  • View all databases
show dbs
Enter fullscreen mode Exit fullscreen mode
  • Create a new or switch databases
show dbs
Enter fullscreen mode Exit fullscreen mode
  • View current Database
db
Enter fullscreen mode Exit fullscreen mode
  • Delete Database
db.dropDatabase()
Enter fullscreen mode Exit fullscreen mode

These are the basic Database Commands of MongoDb.

clickhere to see MongoDb commands

Top comments (0)

An Animated Guide to Node.js Event Loop

>> Check out this classic DEV post <<