Quick Reference
This is a quick reference list of MySQL numeric functions and how they are used to work with databases.
- SQL – MySQL ABS() FunctionThe MySQL ABS() function returns the absolute value of a number.
- SQL – MySQL ACOS() FunctionThe MySQL ACOS() function returns the arc cosine of a number. The specified number must be between -1 and 1, or NULL will be returned.
- SQL – MySQL ASIN() FunctionThe MySQL ASIN() function returns the arc sine of a number. The specified number must be between -1 and 1, or NULL will be returned.
- SQL – MySQL ATAN() FunctionThe MySQL ATAN() function returns the arc tangent of one or two numbers.
- SQL – MySQL ATAN2() FunctionThe MySQL ATAN2() function returns the arc tangent of two numbers.
- SQL – MySQL AVG() FunctionThe MySQL AVG() function returns the average value of an expression (NULL values are ignored).
- SQL – MySQL CEIL() FunctionThe MySQL CEIL() function returns the smallest integer value that is bigger than or equal to a number.
- SQL – MySQL CEILING() FunctionThe MySQL CEILING() function returns the smallest integer value that is bigger than or equal to a number.
- SQL – MySQL COS() FunctionThe MySQL COS() function returns the cosine of a number.
- SQL – MySQL COT() FunctionThe MySQL COT() function returns the cotangent of a number.
- SQL – MySQL COUNT() FunctionThe MySQL COUNT() function returns the number of records returned by a select query. NULL values are not counted.
- SQL – MySQL DEGREES() FunctionThe MySQL DEGREES() function converts a value in radians to degrees.
- SQL – MySQL DIV FunctionThe MySQL DIV function is used for integer division (x is divided by y).
- SQL – MySQL EXP() FunctionThe MySQL EXP() function returns the natural logarithm e (2.718281…) raised to the power of the specified number.
- SQL – MySQL FLOOR() FunctionThe MySQL FLOOR() function returns the largest integer value that is smaller than or equal to a number.
- SQL – MySQL GREATEST() FunctionThe MySQL GREATEST() function returns the greatest value of the list of arguments.
- SQL – MySQL LEAST() FunctionThe MySQL LEAST() function returns the smallest value of the list of arguments.
- SQL – MySQL LN() FunctionThe MySQL LN() function returns the natural logarithm of a number (greater than 0).
- SQL – MySQL LOG() FunctionThe MySQL LOG() function returns the natural logarithm of a specified number, or the logarithm of the number to the specified base.
- SQL – MySQL LOG2() FunctionThe MySQL LOG2() function returns the natural logarithm of a number greater than 0 to base 2.
- SQL – MySQL LOG10() FunctionThe MySQL LOG10() function returns the natural logarithm of a number greater than 0 to base 10.
- SQL – MySQL MAX() FunctionThe MySQL MAX() function returns the maximum value in a set of values.
- SQL – MySQL MIN() FunctionThe MySQL MIN() function returns the minimum value in a set of values.
- SQL – MySQL MOD() FunctionThe MySQL MOD() function returns the remainder of a number divided by another number.
- SQL – MySQL PI() FunctionThe MySQL PI() function returns the value of PI.
- SQL – MySQL POW() FunctionThe MySQL POW() function returns the value of a number raised to the power of another number.
- SQL – MySQL POWER() FunctionThe MySQL POWER() function returns the value of a number raised to the power of another number.
- SQL – MySQL RADIANS() FunctionThe MySQL RADIANS() function converts a degree value (expressed as a positive or negative number) into radians.
- SQL – MySQL RAND() FunctionThe MySQL RAND() function returns a random number between 0 (inclusive) and 1 (exclusive).
- SQL – MySQL ROUND() FunctionThe MySQL ROUND() function rounds a number to a specified number of decimal places.
- SQL – MySQL SIGN() FunctionThe MySQL SIGN() function returns the sign of a number.
- SQL – MySQL SIN() FunctionThe MySQL SIN() function returns the sine of a number.
- SQL – MySQL SQRT() FunctionThe MySQL SQRT() function returns the square root of a number greater than zero.
- SQL – MySQL SUM() FunctionThe MySQL SUM() function calculates the sum of a set of values.
- SQL – MySQL TAN() FunctionThe MySQL TAN() function returns the tangent of a number.
- SQL – MySQL TRUNCATE() FunctionThe MySQL TRUNCATE() function truncates a number to the specified number of decimal places.
SQL Notes:
- Any work being done to modify the structure of a database or delete tables or the the database itself should only be done after making a recent backup
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.