Επεξεργασία

Κοινή χρήση μέσω


SQUARE (NoSQL query)

APPLIES TO: NoSQL

Returns the square of the specified numeric value.

Syntax

SQUARE(<numeric_expr>)  

Arguments

Description
numeric_expr A numeric expression.

Return types

Returns a numeric expression.

Examples

The following example returns the squares of various numbers.

SELECT VALUE {
    squareZero: SQUARE(0),
    squareOne: SQUARE(1),
    squareTwo: SQUARE(2),
    squareThree: SQUARE(3),
    squareNull: SQUARE(null)
}
[
  {
    "squareZero": 0,
    "squareOne": 1,
    "squareTwo": 4,
    "squareThree": 9
  }
]

Remarks

  • This function doesn't use the index.