SQUARE Function [Numeric]

Returns the square of the specified expression as a float.

Syntax

SQUAREnumeric-expression )

Parameters

Parameter

Description

expression

Is a column, variable, or expression with a data type that is either exact numeric, approximate numeric, money, or any type that can be implicitly converted to one of these types. For other data types, the SQUARE function generates an error. The return value is of DOUBLE data type.

Usage

SQUARE function takes one argument. For example, SQUARE (12.01) returns 144.240100.

Standards and Compatibility

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Compatible with Adaptive Server Enterprise.