Azure Cosmos DB Core (SQL) API アカウントにデータベースがあります。 accountnumber という名前の変数に基づいてデータベースにアクセスしてレコードを取得する Azure 関数を作成する必要があります。ソリューションは SQL インジェクション攻撃から保護する必要があります。 関数内でコマンド文をどのように定義すればよいでしょうか?
正解:C
Azure Cosmos DB supports queries with parameters expressed by the familiar @ notation. Parameterized SQL provides robust handling and escaping of user input, and prevents accidental exposure of data through SQL injection. For example, you can write a query that takes lastName and address.state as parameters, and execute it for various values of lastName and address.state based on user input. SELECT * FROM Families f WHERE f.lastName = @lastName AND f.address.state = @addressState