skip to main | skip to sidebar

Bear Technical Sharing

Monday, February 2, 2015

[mongo] delete all data in database

mongo //will start the mongodb shell

show dbs //will list existing databases

use  // is the database you'd like to drop

db //should show  just to be sure I'm working with the right database

db.dropDatabase() //will delete the database and return { "dropped" : "", "ok" : 1 }
Posted by Shawn Yuan at 6:37 PM No comments:
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

About Me

My photo
Shawn Yuan
Taipei, Taiwan
View my complete profile

Labels

  • android
  • drum
  • English
  • ios
  • kernel
  • ndk
  • travel
  • webkit
  • wp8

Blog Archive

  • ►  2016 (1)
    • ►  September (1)
  • ▼  2015 (2)
    • ►  April (1)
    • ▼  February (1)
      • [mongo] delete all data in database
  • ►  2014 (3)
    • ►  December (2)
    • ►  July (1)
  • ►  2013 (10)
    • ►  August (1)
    • ►  May (3)
    • ►  April (3)
    • ►  March (1)
    • ►  January (2)
  • ►  2012 (9)
    • ►  November (4)
    • ►  October (1)
    • ►  August (1)
    • ►  July (1)
    • ►  June (1)
    • ►  May (1)
  • ►  2011 (5)
    • ►  June (1)
    • ►  April (1)
    • ►  January (3)
  • ►  2010 (2)
    • ►  December (2)
  • ►  2009 (3)
    • ►  February (1)
    • ►  January (2)
  • ►  2008 (11)
    • ►  November (8)
    • ►  October (2)
    • ►  September (1)