Last active
November 13, 2017 12:04
-
-
Save jesselima/5d5240362aba8640c425eb2e491529b6 to your computer and use it in GitHub Desktop.
mongo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Select database | |
use database_name | |
// Create Collections | |
db.createColletction('collection_name') | |
// See collections in a database | |
show collections | |
// insert data into a collection | |
db.book.insert({"title" : "abc", "authr" : "xyz", "price" : 123}) | |
// Select documents in a collection | |
db.book.find() | |
// Show selected documents JSON like visual | |
db.book.find().pretty() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment