Question
You have an Azure Cosmos DB for NoSQL account.
You run the following query against a container in the account.
```sql
SELECT
IS_NUMBER("1234") AS A,
IS_NUMBER(1234) AS B,
IS_NUMBER({prop: 1234}) AS C
```
What is the output of the query?
- A. [{"A": false, "B": true, "C": false}] Correct
- B. [{"A": true, "B": false, "C": true}]
- C. [{"A": true, "B": true, "C": false}]
- D. [{"A": true, "B": true, "C": true}]
Explanation
IS_NUMBER returns true only when the expression's type is a JSON number. "1234" is a string, so A is false; 1234 is a number, so B is true; {prop: 1234} is an object, so C is false even though it contains a number. IS_NUMBER does not convert strings or inspect object properties, which rules out the other outputs.