Question 240
A database query must read the integer priority from a JSON document and filter on it, but the developer currently compares full JSON text. What should the SQL developer do next?
Explanation
Correct Answer
JSON property extraction distinguishes one scalar from a serialized document.
Incorrect Answers
Use a supported JSON path or containment predicate with explicit validation of path and value semantics: structured containment checks avoid treating arbitrary text resemblance as proof of a matching JSON element.
Parse the array with OPENJSON and an explicit expected schema before applying policy checks: parse the array with OPENJSON and an explicit expected schema before applying policy checks: jSON expansion converts structured array elements into rows instead of brittle string splits.
Use the platform's JSON_ARRAYAGG capability and validate output types and ordering expectations: use the platform's JSON_ARRAYAGG capability and validate output types and ordering expectations: jSON array construction represents elements as data rather than ambiguous delimiter-separated text.



Developing AI-Enabled Database Solutions (DP-800) Practice Tests