Câu 23: C100DEV: MongoDB Associate Developer
Given the following documents in a collection:{_id:1, a: “one”, b: “two”}{_id:2, a: “two”, b: “three”}{_id:3, a: “one”, b: “four”, c: “three”}Using the following update command:db.coll.replaceOne({a: “one”}, {d: “two”, b: “five”})What would the contents of the collection be after successfully running this command?
Nội dung câu hỏi
Given the following documents in a collection:{_id:1, a: “one”, b: “two”}{_id:2, a: “two”, b: “three”}{_id:3, a: “one”, b: “four”, c: “three”}Using the following update command:db.coll.replaceOne({a: “one”}, {d: “two”, b: “five”})What would the contents of the collection be after successfully running this command?
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. {_id:1, d: “two”, b: “five”}{_id:2, a: “two”, b: “three”}{_id:3, a: “one”, b: “four”, c: “three”} — đáp án hiện tại
- B. {_id:1, a: “one”, b: “five”}{_id:2, a: “two”, b: “three”}{_id:3, a: “one”, b: “four”, c: “three”}
- C. {_id:1, a: “one”, d: “two”, b: “five”}{_id:2, a: “two”, b: “three”}{_id:3, a: “one”, b: “four”, c: “three”}
- D. {_id:1, d: “two”, b: “five”}{_id:2, a: “two”, b: “three”}{_id:3, d: “two”, b: “five”}
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.