Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

greater than in mongodb query

-- mongdbo
db.people.find(
    { age: { $gt: 25 } }
)
-- sql 
SELECT *
FROM people
WHERE age > 25
-- mongdbo
db.people.find(
   { age: { $lt: 25 } }
)
-- sql 
SELECT *
FROM people
WHERE age < 25
-- mongodb
db.people.find(
   { age: { $gt: 25, $lte: 50 } }
)
-- sql 
SELECT *
FROM people
WHERE age > 25
AND   age <= 50
Source by www.mongodb.com #
 
PREVIOUS NEXT
Tagged: #greater #mongodb #query
ADD COMMENT
Topic
Name
6+7 =