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

sqrt()

The mathematical function sqrt() returns the square root of the value declared in the parameter "number".

Syntax of the Mathematical Function sqrt()

    sqrt(number)
    

The parameter "number" of the Mathematical Function sqrt()

number
The parameter "number" is a placegholder for a number, which can be of one of the datatypes float, real or double precision Additionally, the parameter "number" recognises every other datatype which can be convertied into one of the required datatypes using implicit conversion. The parameter "number" does not accept negative values.

Example for the Mathematical Function sqrt()

    select sqrt(16)
go
-----
4.000000

Returns 4.000000.

    select sqrt(-16)
go
Domain error occurred.
-----

Returns the error message "Domain error occurred.".

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(),
tan().