Câu 75: DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB
You have a database in an Azure Cosmos DB Core (SQL) API account. You need to create an Azure function that will access the database to retrieve records based on a variable named accountnumber. The solution must protect against SQL injection attacks. How should you define the command statement in the function?
Nội dung câu hỏi
You have a database in an Azure Cosmos DB Core (SQL) API account. You need to create an Azure function that will access the database to retrieve records based on a variable named accountnumber. The solution must protect against SQL injection attacks. How should you define the command statement in the function?
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. cmd = "SELECT * FROM Persons p WHERE p.accountnumber = 'accountnumber'"
- B. cmd = "SELECT * FROM Persons p WHERE p.accountnumber = LIKE @accountnumber"
- C. cmd = "SELECT * FROM Persons p WHERE p.accountnumber = @accountnumber" — đáp án hiện tại
- D. cmd = "SELECT * FROM Persons p WHERE p.accountnumber = '" + accountnumber + "'"
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.