daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. db.restaurants.find({})
  2. db.restaurants.find({}).sort({name: 1}).limit(10)
  3. db.restaurants.find({_id:ObjectId("59074c7c057aaffaafb0da64")})
  4. db.restaurants.find({borough: "Queens"})
  5. db.restaurants.count({})
  6. db.restaurants.find({'address.zipcode': '11224'}).count()
  7. db.restaurants.deleteOne({_id:ObjectId("59074c7c057aaffaafb0da64"})
  8.  
  9. var myId = db.restaurants.findOne({}, {_id: true})._id;
  10. db.restaurants.updateOne(
  11.   {_id: myId},
  12.   {$set: {name: 'Bizz Bar Bang'}});
  13.  
  14. db.restaurants.updateMany({'address.zipcode': '10035'},{$set: {'address.zipcode': '10036'}});
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top