CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 45: C100DBA: MongoDB Associate Database Administrator

Consider a products collection that contains these documents:{“_id”: 1, “item”: “t-shirt”, “color”: “red”, “price”: 10},{“_id”: 2, “item”: “sweater”, “color”: “green”, “price”: 20},{“_id”: 3, “item”: “belt”, “color”: “black”, “price”: 15},{“_id”: 4, “item”: “hat”, “color”: “green”, “price”: 12}What operation modifies…

Nội dung câu hỏi

Consider a products collection that contains these documents:{“_id”: 1, “item”: “t-shirt”, “color”: “red”, “price”: 10},{“_id”: 2, “item”: “sweater”, “color”: “green”, “price”: 20},{“_id”: 3, “item”: “belt”, “color”: “black”, “price”: 15},{“_id”: 4, “item”: “hat”, “color”: “green”, “price”: 12}What operation modifies the price of all products that have a color value of “green”?

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.

  1. A. db.products.updateMulti({“color”: “green”},{$inc:{“price” : 5}})
  2. B. db.products.updateMany({“color”: “green”},{$inc:{“price” : 5}}) — đáp án hiện tại
  3. C. db.products.updateEach({“color”: “green”},{$inc:{“price” : 5}})
  4. D. db.products.updateAll({“color”: “green”},{$inc:{“price” : 5}})

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.

Câu hỏi liền kề