MongoDb: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
== Cheat sheet == | == Cheat sheet == | ||
* Connect to a mongodb | * Connect to a mongodb | ||
<pre> | <pre>mongo</pre> | ||
* Display dabases | * Display dabases | ||
<pre>show dbs</pre> | <pre>show dbs</pre> |
Revision as of 05:02, 8 May 2015
Cheat sheet
- Connect to a mongodb
mongo
- 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()