How to delete a Database in MongoDB?

0 0
Read Time:15 Second

Delete a Database in MongoDB

To delete a database, use the db.dropDatabase() method which deletes a current database.

Delete Database

Above, { ok: 1, dropped: 'humanResourcedb' } indicates that the database deleted successfully.

Note: Method names are case sensitive. So, executing db.dropdatabase() will throw an error.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
100%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

One thought on “How to delete a Database in MongoDB?

  1. Wow, awesome blog layout! How long have you been running a blog for?

    you make running a blog glance easy. The whole look of your web site is great, as smartly as the content!

Leave a Comment