Wednesday, 6 January 2016

MongoDB -- Drop

To drop a data base, you should be in that database, because the current  database which you are working has to be deleted, here's a few examples for you:

Create a database

  command: use exdb

Check your current database

 command: db
Drop the database:
 command: db.dropDatabase()

output: {"ok":1}

    

No comments:

Post a Comment