Summer Certification Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: force70

Microsoft Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB DP-420 Question # 37 Topic 4 Discussion

Microsoft Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB DP-420 Question # 37 Topic 4 Discussion

DP-420 Exam Topic 4 Question 37 Discussion:
Question #: 37
Topic #: 4

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?


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 "


D.

cmd = " SELECT * FROM Persons p

WHERE p.accountnumber = ' " + accountnumber + " ' "


Get Premium DP-420 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.