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
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

Find out non-numeric values present in a Column by using CONCAT

Visitors Rating
Your Rating


Google+
mohamed

24-07-2014

iwant learn math using php and mysql

Post Comment This is for short comments only. Use the forum for more discussions.








HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2017 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer