MongoDb: Difference between revisions
Jump to navigation
Jump to search
(Created page with "* Connect to a mongodb <pre>mongodb</pre> * Display dabases <pre>show dbs</pre> * Connect to a database <pre>use database</pre> * List Tables (Collections) <pre>show collectio...") |
No edit summary |
||
Line 1: | Line 1: | ||
== Cheat sheet == | |||
* Connect to a mongodb | * Connect to a mongodb | ||
<pre>mongodb</pre> | <pre>mongodb</pre> | ||
Line 13: | Line 14: | ||
* Remove Database (Collections) | * Remove Database (Collections) | ||
<pre>db.dropDatabase()</pre> | <pre>db.dropDatabase()</pre> | ||
== Http Interface == | |||
[http://localhost:28017/ Http Interface] |
Revision as of 21:41, 27 April 2015
Cheat sheet
- Connect to a mongodb
mongodb
- Display dabases
show dbs
- Connect to a database
use database
- List Tables (Collections)
show collections
- Display content of a table
db.collection.find()
- Remove Tables (Collections)
db.collection.drop()
- Remove Database (Collections)
db.dropDatabase()