“changed content”}}) > db.blogs.update({tags: “rant”}, ... {$set: {content: “REDACTED”}}, { multi: true }) -- update a single entity UPDATE blogs SET content = ‘changed content’ WHERE id = 1 -- update multi (automatic) UPDATE blogs SET content = ‘REDACTED’ WHERE content LIKE ‘%s**t%’
1}) -- get all blog entries SELECT * FROM blogs -- get first blog entry SELECT * FROM blogs LIMIT 1 -- get the contents column SELECT content FROM blogs
> db.blogs.find({rating: { $gt: 3}}) -- get all blog entries with a rating of 5 SELECT * FROM blogs WHERE rating = 5 -- get entries with 5 rating orderd by author SELECT * FROM blogs WHERE rating = 5 ORDER BY author -- get all blog entries with a rating of 3 or greater SELECT * FROM blogs WHERE rating > 3