Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

where condition in mongodb

-- mongodb : 
db.people.find(
    { status: "A" }
)
--sql
SELECT *
FROM people
WHERE status = "A"
-- mongodb 
db.people.find(
    { status: "A" },
    { user_id: 1, status: 1, _id: 0 }
)
-- sql
SELECT user_id, status
FROM people
WHERE status = "A"
Source by www.mongodb.com #
 
PREVIOUS NEXT
Tagged: #condition #mongodb
ADD COMMENT
Topic
Name
8+1 =