Delete table from mongodb database

I am really new to mongodb. I want to see data in one of my tables in the mongodb database. I tried using db.table_name.remove db.table_name.drop , but nothing works. also the answer is rather strange.

 function () { if (arguments.length > 0) { throw "drop takes no argument"; } this.resetIndexCache(); var ret = this._db.runCommand({drop:this.getName()}); if (!ret.ok) { if (ret.errmsg == "ns not found") { return false; } throw "drop failed: " + tojson(ret); } return true; } 

So please tell me the commands to delete the table completely.

+4
source share
1 answer

Your syntax is incorrect, use () after deleting and deleting. The answer (result) must be true or false . For more information see http://www.mongodb.org/display/DOCS/Overview+-+The+MongoDB+Interactive+Shell

+4
source

All Articles