DP-420 practice question 19 of 25

You have an Azure Cosmos DB Core (SQL) API account. You run the following query against a container in the account. SELECT IS_NUMBER("1234") AS A, IS_NUMBER(1234) AS B, IS_NUMBER({prop: 1234}) AS C What is the output of the query?

Full set: 144 questions
Answer options
A: [{"A": false, "B": true, "C": false}] Correct answer
B: [{"A": true, "B": false, "C": true}]
C: [{"A": true, "B": true, "C": false}]
D: [{"A": true, "B": true, "C": true}]
Correct Answer:
A. [{"A": false, "B": true, "C": false}]
Explanation

ISNUMBER returns true only for JSON numeric primitives.
• "1234" is a string ⇒ false.
• 1234 is a number ⇒ true.
• {prop: 1234} is an object ⇒ false. Therefore the output is [{"A": false, "B": true, "C": false}].

Why Incorrect

B. Treats number literal as non-numeric and object as numeric—opposite of function semantics.
C. Mis-labels string “1234” as numeric; object still non-numeric.
D. Says every argument is numeric; contradicts ISNUMBER definition.

References

1. Microsoft Docs – “System functions > ISNUMBER

” learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/isnumber (returns true when input is numeric literal).

Scroll to Top