A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Functions: Mathematical Functions

square()

The mathematical function square() returns the value to the second power, specified in the parameter of the function as datatype float. The same result can be achieved, using the function power() when specifying a value of "2" for the parameter power. The difference lies in the datatype of the return vlaue, which, in contrast to the function power, is not an int, but a float datatype. The function square() is a T-SQL extension, which can be executed by any user. The function square() is available in ASE starting with version 12.5.0.3.

Syntaxof the Mathematical function square()

    square(numeric_expression)
    

The Parameter of the Mathematical Function square()

"numeric_expression"
The parameter "numeric_expression" is a number in the datatype float

Example for the Mathematical Function square()

    select square(3)
go
---------------------
9

Returns the result of "3" to the 2nd power, equals "9".

See also:

ASE T-SQL - Aggregate Functions,
Mathematical Functions,
abs(),
acos(),
asin(),
atan(),
atn2(),
ceiling(),
cos(),
cot(),
degrees(),
exp(),
floor(),
log(),
log10(),
pi(),
power(),
radians(),
rand(),
round(),
sign(),
sin(),
sqrt(),
tan().