- Tags: MySQL
- Categories: Reference, SQL Reference, SQL Resources
Quick Reference
This is a quick reference list of MySQL numeric functions and how they are used to work with databases.
SQL – MySQL ABS() Function
The MySQL ABS() function returns the absolute value of a number.
SQL – MySQL ACOS() Function
The 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() Function
The 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() Function
The MySQL ATAN() function returns the arc tangent of one or two numbers.
SQL – MySQL ATAN2() Function
The MySQL ATAN2() function returns the arc tangent of two numbers.
SQL – MySQL AVG() Function
The MySQL AVG() function returns the average value of an expression (NULL values are ignored).
SQL – MySQL CEIL() Function
The MySQL CEIL() function returns the smallest integer value that is bigger than or equal to a number.
SQL – MySQL CEILING() Function
The MySQL CEILING() function returns the smallest integer value that is bigger than or equal to a number.
SQL – MySQL COS() Function
The MySQL COS() function returns the cosine of a number.
SQL – MySQL COT() Function
The MySQL COT() function returns the cotangent of a number.
SQL – MySQL COUNT() Function
The MySQL COUNT() function returns the number of records returned by a select query. NULL values are not counted.
SQL – MySQL DEGREES() Function
The MySQL DEGREES() function converts a value in radians to degrees.
SQL – MySQL DIV Function
The MySQL DIV function is used for integer division (x is divided by y).
SQL – MySQL EXP() Function
The MySQL EXP() function returns the natural logarithm e (2.718281…) raised to the power of the specified number.
SQL – MySQL FLOOR() Function
The MySQL FLOOR() function returns the largest integer value that is smaller than or equal to a number.
SQL – MySQL GREATEST() Function
The MySQL GREATEST() function returns the greatest value of the list of arguments.
SQL – MySQL LEAST() Function
The MySQL LEAST() function returns the smallest value of the list of arguments.
SQL – MySQL LN() Function
The MySQL LN() function returns the natural logarithm of a number (greater than 0).
SQL – MySQL LOG() Function
The MySQL LOG() function returns the natural logarithm of a specified number, or the logarithm of the number to the specified base.
SQL – MySQL LOG2() Function
The MySQL LOG2() function returns the natural logarithm of a number greater than 0 to base 2.
SQL – MySQL LOG10() Function
The MySQL LOG10() function returns the natural logarithm of a number greater than 0 to base 10.
SQL – MySQL MAX() Function
The MySQL MAX() function returns the maximum value in a set of values.
SQL – MySQL MIN() Function
The MySQL MIN() function returns the minimum value in a set of values.
SQL – MySQL MOD() Function
The MySQL MOD() function returns the remainder of a number divided by another number.
SQL – MySQL PI() Function
The MySQL PI() function returns the value of PI.
SQL – MySQL POW() Function
The MySQL POW() function returns the value of a number raised to the power of another number.
SQL – MySQL POWER() Function
The MySQL POWER() function returns the value of a number raised to the power of another number.
SQL – MySQL RADIANS() Function
The MySQL RADIANS() function converts a degree value (expressed as a positive or negative number) into radians.
SQL – MySQL RAND() Function
The MySQL RAND() function returns a random number between 0 (inclusive) and 1 (exclusive).
SQL – MySQL ROUND() Function
The MySQL ROUND() function rounds a number to a specified number of decimal places.
SQL – MySQL SIGN() Function
The MySQL SIGN() function returns the sign of a number.
SQL – MySQL SIN() Function
The MySQL SIN() function returns the sine of a number.
SQL – MySQL SQRT() Function
The MySQL SQRT() function returns the square root of a number greater than zero.
SQL – MySQL SUM() Function
The MySQL SUM() function calculates the sum of a set of values.
SQL – MySQL TAN() Function
The MySQL TAN() function returns the tangent of a number.
SQL – MySQL TRUNCATE() Function
The MySQL TRUNCATE() function truncates a number to the specified number of decimal places.
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.
Why 1SMARTchicken?
See More →
Thanks for your support!
SQL Books
All are affiliate links. Thank you for your support!
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
Feedback
If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.