MongoDB Certified DBA Associate Exam (Based on MongoDB 4.4) C100DBA Question # 1 Topic 1 Discussion

MongoDB Certified DBA Associate Exam (Based on MongoDB 4.4) C100DBA Question # 1 Topic 1 Discussion

C100DBA Exam Topic 1 Question 1 Discussion:
Question #: 1
Topic #: 1

What is the equivalent command in MongoDB for the following SQL query?

SELECT * FROM posts WHERE author like "%john%"


A.

db.posts.find( { author: /John/ } )


B.

db.posts.find( { author: /AjohnA/ > )


C.

db.posts.find( { $like: {author: /John/} } )


D.

db.posts.find( { author: {$like: /John/} } )


Get Premium C100DBA Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.