Câu 21: C100DBA: MongoDB Associate Database Administrator
Given the following MongoDB document in the users collection:{“userid”: 1,“first”: “John”,“roles”: “Basic”}Which of the following statements results in this document?{“userid”: 1,“first”: “John”,“roles”: “SuperUser”}
Nội dung câu hỏi
Given the following MongoDB document in the users collection:{“userid”: 1,“first”: “John”,“roles”: “Basic”}Which of the following statements results in this document?{“userid”: 1,“first”: “John”,“roles”: “SuperUser”}
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.replaceOne({ userid: 1 },{ first: “John”, roles: “SuperUser” })
- B. db.users.replaceOne({ userid: 1 },{ $set: { roles: “SuperUser” } })
- C. db.users.replaceOne({ userid: 1 },{ userid: 1, first: “John”, roles: “SuperUser” }) — đáp án hiện tại
- D. db.users.replaceOne({ userid: 1 },{ roles: “SuperUser” })
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.