W3cubDocs

/MariaDB

Numeric Functions

Functions dealing with numerals, including ABS, CEIL, DIV, EXP, PI, SIN, etc.

Title Description
Addition Operator (+) Addition.
Subtraction Operator (-) Subtraction and unary minus.
Division Operator (/) Division.
Multiplication Operator (*) Multiplication.
Modulo Operator (%) Modulo operator. Returns the remainder of N divided by M.
DIV Integer division.
ABS Returns an absolute value.
ACOS Returns an arc cosine.
ASIN Returns the arc sine.
ATAN Returns the arc tangent.
ATAN2 Returns the arc tangent of two variables.
CEIL Synonym for CEILING().
CEILING Returns the smallest integer not less than X.
CONV Converts numbers between different number bases.
COS Returns the cosine.
COT Returns the cotangent.
CRC32 Computes a cyclic redundancy check value.
DEGREES Converts from radians to degrees.
EXP e raised to the power of the argument.
FLOOR Largest integer value not greater than the argument.
GREATEST Returns the largest argument.
LEAST Returns the smallest argument.
LN Returns natural logarithm.
LOG Returns the natural logarithm.
LOG10 Returns the base-10 logarithm.
LOG2 Returns the base-2 logarithm.
MOD Modulo operation. Remainder of N divided by M.
OCT Returns octal value.
PI Returns the value of π (pi).
POW Returns X raised to the power of Y.
POWER Synonym for POW().
RADIANS Converts from degrees to radians.
RAND Random floating-point value.
ROUND Rounds a number.
SIGN Returns 1, 0 or -1.
SIN Returns the sine.
SQRT Square root.
TAN Returns the tangent.
TRUNCATE The TRUNCATE function truncates a number to a specified number of decimal places.
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/numeric-functions/