Math functions in MySQL

We can use various mathematical functions available in MySQL queries to handle data. We can combine these functions with other SQL operations to perform complex calculations within our queries.
Functions Description
ABSAbsolute value of a number
ACOSArc cos of the input
ASINArc sin of the input
ATANArc tan of the input
ATAN2Arc tan of two inputs
AVGWe can get the average value of a range of data by using avg function.
CEILMath ceil function to get lowest integer value.
CONV()Convert one base to another
COS()COS() function takes input in Radian
COT()COT() function takes input in Radian
COUNTCounting the number of records in a table with conditions
CRC32()CRC32() returns 32 bit unsigned value of a string
DEGREESConvert Radian value to Degree
EXPe raised to the power of X
FLOORMath floor function to get highest integer value.
LNLog of the number (Same as LOG())
LOGLog of the number with different Base value
LOG10Log of the number with fixed Base 10 value
LOG2Log of the number with fixed Base 2 value
MAXMaximum value from a field of MySQL table by using max command
MINMinimum value among records by using MIN Query
ModGetting the reminder of a division and using in our Query
PIPI() value with different functions
POWPower of a number & creating a square table
RADIANSConverting Degree to Radians in our Query
ROUNDRounded to decimals
SIGNSign of the argument
SINSin of a radian input
SUMOur query can return sum of numeric data present in a record
TANTan of a radian input
Second highestWE can display first and second highest number present in table by using limit and order by commands
Data formatGetting the formatted output from MySQL table by using format query.
sqrtSquare root of number
TRUNCATEConverting to fixed decimal value
STDDEV()Standard Deviation
Find out non-numeric values present in a Column by using CONCAT

Practice Questions

Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net


    iwant learn math using php and mysql

    Post your comments , suggestion , error , requirements etc here

    SQL Video Tutorials

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer