DEV Community

yaswanthteja
yaswanthteja

Posted on

2 1

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)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay