Numeric functions perform mathematical operations on numerical data types or return numeric information.
Sybase IQ does not have the same constants or data type promotions as Adaptive Server Anywhere, with which it shares a common user interface. If you issue a SELECT statement without a FROM clause, the statement is passed through to Adaptive Server Anywhere. For the most consistent results, therefore, you should always include the table name in the FROM clause whether you need it or not. (You may create a dummy table just to use in such cases.)
Table 5-3 lists all numeric functions and their parameters.
Numeric function |
Parameters |
---|---|
ABS |
( numeric-expr ) |
ACOS |
( numeric-expr ) |
ASIN |
( numeric-expr ) |
ATAN |
( numeric-expr ) |
ATAN2 |
( numeric-expr1, numeric-expr2 ) |
CEILING |
( numeric-expr ) |
COS |
( numeric-expr ) |
COT |
( numeric-expr ) |
DEGREES |
( numeric-expr ) |
EXP |
( numeric-expr ) |
FLOOR |
( numeric-expr ) |
LOG |
( numeric-expr ) |
LOG10 |
( numeric-expr ) |
MOD |
( dividend, divisor ) |
PI |
( * ) |
POWER |
( numeric-expr1, numeric-expr2 ) |
RADIANS |
( numeric-expr ) |
RAND |
( [ integer-expr ] ) |
REMAINDER |
( numeric-expr, numeric-expr ) |
ROUND |
( numeric-expr, integer-expr ) |
SIGN |
( numeric-expr ) |
SIN |
( numeric-expr ) |
SQRT |
( numeric-expr ) |
TAN |
( numeric-expr ) |
“TRUNCATE” |
( numeric-expr, integer-expr ) |
TRUNCNUM |
( numeric-expression, integer-expression ) |