UnityJDBC - Mathematical Functions
Summary
Function | Syntax | Description |
---|---|---|
ABS | ABS(expr) | Returns the absolute value of expr. |
ACOS | ACOS(expr) | Returns the arc cosine of expr. |
ASIN | ASIN(expr) | Returns the arc sine of expr. |
ATAN | ATAN(expr) | Returns the arc tangent of expr. |
ATAN2 | ATAN2( expr1, expr2) | Returns the arc tangent of expr2 / expr1. |
CEILING | CEILING( expr) | Computes the ceiling of expr. |
COS | COS(expr) | Returns the cosine of expr. |
COT | COT(expr) | Returns the cotangent of expr. |
DEGREES | DEGREES(expr) | Converts from radians to degrees. |
EXP | EXP(expr) | Computes the exponential of expr. |
FLOOR | FLOOR(expr) | Computes the floor of expr. |
INC | INC() | Produces an integer sequence starting at 1. |
LN | LN(expr) | Computes natural logarithm. |
LOG | LOG(expr) | Computes natural logarithm of expr. |
LOG10 | LOG10(expr) | Returns the base-10 logarithm of expr. |
MOD | expr1 % expr2 | Returns the remainder of expr1 divided by expr2. |
PI | PI() | Returns the value of pi. |
POWER | POWER(expr1, expr2) | Computes expr1 to the expr2-th power. |
RADIANS | RADIANS(expr) | Returns expr converted from degrees to radians. |
RAND | RAND(expr) | Generates a random number between 0 and 1 given a seed. |
RAND | RAND() | Generates a random number between 0 and 1. |
RANDOM | RANDOM(expr) | Generates a random number between 0 and 1 given a seed. |
RANDOM | RANDOM() | Generates a random number between 0 and 1. |
ROUND | ROUND(expr1, expr2) | Rounds expr1 to expr2 decimal places. |
ROUND | ROUND(expr) | Rounds expr to an integer value. |
SIGN | SIGN(expr) | Returns sign of the argument (-1, 0, +1). |
SIN | SIN(expr) | Returns the sine of expr given in radians. |
SQRT | SQRT(expr) | Computes the square root of expr. |
TAN | TAN(expr) | Returns the tangent of expr given in radians. |
Detailed Function Descriptions
ABS
Syntax: ABS(expr)
Returns the absolute value of expr.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
ACOS
Syntax: ACOS(expr)
Returns the arc cosine of expr, that is, the value whose cosine is expr. Returns NULL if expr is not in the range -1 to 1.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
ASIN
Syntax: ASIN(expr)
Returns the arc sine of expr, that is, the value whose sine is expr. Returns NULL if expr is not in the range -1 to 1.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
ATAN
Syntax: ATAN(expr)
Returns the arc tangent of expr, that is, the value whose tangent is expr.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
ATAN2
Syntax: ATAN2( expr1, expr2)
Returns the arc tangent of the two variables expr1and expr2. It is similar to calculating the arc tangent of expr2 / expr1, except that the signs of both arguments are used to determine the quadrant of the result.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
CEILING
Syntax: CEILING( expr)
Computes the ceiling of a numeric value expr.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
COS
Syntax: COS(expr)
Returns the cosine of expr given in radians.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
COT
Syntax: COT(expr)
Returns the cotangent of expr.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
DEGREES
Syntax: DEGREES(expr)
Returns the argument expr converted from radians to degrees.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
EXP
Syntax: EXP(expr)
Computes the exponential of expr.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
FLOOR
Syntax: FLOOR(expr)
Computes the floor of expr.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
INC
Syntax: INC()
This function produces an integer sequence starting at 1. e.g. 1,2,3,4,.. A new number is assigned for each tuple processed.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
LN
Syntax: LN(expr)
Computes natural logarithm of expr. Equivalent to LOG() function.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
LOG
Syntax: LOG(expr)
Computes natural logarithm of expr. Equivalent to LN() function.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
LOG10
Syntax: LOG10(expr)
Returns the base-10 logarithm of expr.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
MOD
Syntax: expr1 % expr2
Returns the remainder of expr1 divided by expr2.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
PI
Syntax: PI()
Returns the value of pi.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
POWER
Syntax: POWER(expr1, expr2)
Computes expr1 to the expr2-th power.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
RADIANS
Syntax: RADIANS(expr)
Returns expr converted from degrees to radians.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
RAND
Syntax: RAND(expr)
Generates a random number between 0 and 1. The parameter is the seed.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
RAND
Syntax: RAND()
Generates a random number between 0 and 1. Equivalent to RANDOM() function.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
RANDOM
Syntax: RANDOM(expr)
Generates a random number between 0 and 1. The parameter is the seed.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
RANDOM
Syntax: RANDOM()
Generates a random number between 0 and 1. Equivalent to RAND() function.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
ROUND
Syntax: ROUND(expr1, expr2)
Rounds expr1 to expr2 decimal places.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
ROUND
Syntax: ROUND(expr)
Rounds expr to an integer value.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
SIGN
Syntax: SIGN(expr)
Returns -1 if expr is smaller than 0, 0 if expr==0 and 1 if expr is bigger than 0.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
SIN
Syntax: SIN(expr)
Returns the sine of expr given in radians.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
SQRT
Syntax: SQRT(expr)
Computes the square root of expr.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|
TAN
Syntax: TAN(expr)
Returns the tangent of expr given in radians.
SQL Server | Access | Oracle | PostgreSQL | MySQL | Sybase | HSQLDB |
---|---|---|---|---|---|---|