What is the output of the query?

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?
A . [{"A": false, "B": true, "C": false}]
B . [{"A": true, "B": false, "C": true}]
C . [{"A": true, "B": true, "C": false}]
D . [{"A": true, "B": true, "C": true}]

Answer: A

Explanation:

IS_NUMBER returns a Boolean value indicating if the type of the specified expression is a number.

"1234" is a string, not a number.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-is-number

Latest DP-420 Dumps Valid Version with 51 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments