WWW.DBVERSITY.COM
WWW.DBVERSITY.COM
Menu
  • Home
  • About us
  • Discussions
  • Login / Register
Welcome to the world of Database Technologies
Browse: Home » mongo cheatsheet

MongoDB Cheat Sheet

November 23, 2022 · by dbversity · in MongoDB

show dbs db // prints the current database use <database_name> show tables / show collections CRUD operations: ============================================================================== CRUD: create, read, update, delete,remove select <projection> from Student where <condition> db.Student.find(<condition>,<projeciton>) db.products.insert({item:”TV”,aqty:200,soldqty:1200,avail:true}) db.products.insert({item:”MP3″,aqty:300,soldqty:500,avail:true}) db.products.insert({item:”MOBILE”,aqty:0,soldqty:2000,avail:false}) db.products.insert({item:”MOUSE”,aqty:1000,soldqty:3000,avail:true}) db.products.insert({item:”LAPTOP”,aqty:0,soldqty:1800,avail:false}) db.products.insert({item:”AC”,aqty:100,soldqty:700,avail:true}) db.products.insert({item:”KEYBOARD”,aqty:2000,soldqty:500,avail:true}) db.products.insert({item:”SPEAKER”,aqty:300,soldqty:3000,avail:true}) db.products.insert({item:”OVEN”,aqty:500,soldqty:1200,avail:true}) db.products.insert({item:”FAN”,aqty:550,soldqty:750,avail:true})…

Categories

Categories

Copyright © 2025 WWW.DBVERSITY.COM

Powered by WordPress and Origin