Databases Reference
In-Depth Information
Table 3.3
Built-In Numeric Functions (continued)
Function
Description
ASIN
Returns the arc sine
ATAN
Returns the arc tangent
ATAN2
Returns the arc tangent of two values
BITAND
Performs a bitwise AND on two arguments
CEIL
Returns the next highest integer
COS
Returns the cosine
COSH
Returns the hyperbolic cosine
EXP
Raises e (2.718281828…) to the specified power
FLOOR
Returns the next lowest integer
LN
Returns the natural logarithm (base e )
LOG
Returns the base 10 logarithm
MOD
Returns the remainder of the first argument divided by the sec-
ond, using FLOOR in the calculation
NANVL
Returns an alternate value if the first argument is non-numeric
POWER
Raises a number to an arbitrary power
REMAINDER
Returns the remainder of the first argument divided by the sec-
ond, similar to MOD except that REMAINDER uses ROUND
ROUND
Returns a rounded value to an arbitrary precision
SIGN
Returns -1 if the argument is negative, 0 if 0, or 1 if positive
SIN
Returns the sine
SQRT
Returns the square root of the argument
TAN
Returns the tangent
TRUNC
Truncates a number to an arbitrary precision
Scott's company has survived its first month and has even turned a small
profit. Scott wants to find a way to distribute the first month's profit in a fair
manner, so he turns to the company mathematician and statistician, Julie. She
suggests that the employees get a one-time bonus that is based on the square root
of their current salary. Scott can run the following query to see what the potential
bonuses might be using the SQRT function:
select ename, sal, sqrt(sal) from emp;
Search WWH ::




Custom Search