# Math functions in MySQL

We can use various mathematical functions available in MySQL queries to handle our numeric data in a table. We can update our data with new data or use them in our script as per our requirements. We will discuss some of the important math functions used frequently in queries for MySQL table.
 Functions Description ABS Absolute value of a number ACOS Arc cos of the input ASIN Arc sin of the input ATAN Arc tan of the input ATAN2 Arc tan of two inputs AVG We can get the average value of a range of data by using avg function. CEIL Math 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 COUNT Counting the number of records in a table with conditions CRC32() CRC32() returns 32 bit unsigned value of a string DEGREES Convert Radian value to Degree EXP e raised to the power of X FLOOR Math floor function to get highest integer value. LN Log of the number (Same as LOG()) LOG Log of the number with different Base value LOG10 Log of the number with fixed Base 10 value LOG2 Log of the number with fixed Base 2 value MAX Maximum value from a field of mysql table by using max command MIN Minimum value among records by using MIN Query Mod Getting the reminder of a division and using in our Query PI PI() value with different functions POW Power of a number & creating a square table RADIANS Converting Degree to Radians in our Query ROUND Rounded to decimals SIGN Sign of the argument SIN Sin of a radian input SUM Our query can return sum of numeric data present in a record TAN Tan of a radian input Second highest WE can display first and second highest number present in table by using limit and order by commands Data format Getting the formatted output from mysql table by using format query. sqrt Square root of number TRUNCATE Converting to fixed decimal value STDDEV() Standard Deviation VARIANCE() Variance plus2net.com

 mohamed 24-07-2014 iwant learn math using php and mysql

Post your comments , suggestion , error , requirements etc here .