Câu 34: C100DBA: MongoDB Associate Database Administrator
A collection named users contains the following sample documents: A MongoDB administrator needs to identify all documents where the status field is either “active” or “pending”.What query using the $in operator meets this requirement?
Nội dung câu hỏi
A collection named users contains the following sample documents: A MongoDB administrator needs to identify all documents where the status field is either “active” or “pending”.What query using the $in operator meets this requirement?
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. db.users.find({ “status”: { “$in”: { “active”: true, “pending”: true } } })
- B. db.users.find({ “status”: { “$in”: [“active”, “pending”] } }) — đáp án hiện tại
- C. db.users.find({ “status”: { “$in”: “active pending” } })
- D. db.users.find({ “status”: { “$in”: “active”, “pending” } })
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.
Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.