How should you define the command statement in the function?

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 + “‘”

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.