Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

like in mongodb

-- mongodb
db.people.find( { user_id: /bc/ } )
-- or 
db.people.find( { user_id: { $regex: /bc/ } } )
-- sql 
SELECT *
FROM people
WHERE user_id like "%bc%"
-- mongodb
db.people.find( { user_id: /^bc/ } )
-- or 
db.people.find( { user_id: { $regex: /^bc/ } } )
--sql 
SELECT *
FROM people
WHERE user_id like "bc%"
Source by www.mongodb.com #
 
PREVIOUS NEXT
Tagged: #mongodb
ADD COMMENT
Topic
Name
1+6 =