-- 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%"