MYSQL Functions mysql-functions.pdf

Often we are required to perform lot of aggregations on columns containing string and numeric data. For this purpose MYSQL provides lot of in-built functions. 

These MYSQL functions are defined to provide single value for all the aggregations by running functions or operations on the column provided to them as input.

MYSQL Provides lot of functions that are listed below

MYSQL AVG() Function - MYSQL AVG function will calculate the average value of all the input column values.

MYSQL COUNT() Function - MYSQL COUNT function will return the total number of rows in the table.

MYSQL FIRST() Function - MYSQL FIRST function will returns the first value in the table.

MYSQL LAST() Function - MYSQL LAST function will returns the last value in the table.

MYSQL MAX() Function - MYSQL MAX function will return the maximum value of all the input column values.

MYSQL MIN() Function - MYSQL MIN function will return the minimum value of all the input column values.

MYSQL SUM() Function - MYSQL SUM function will return the summation of all the input column values.

MYSQL UCASE() Function - MYSQL UCASE function will return the input column values in upper case.

MYSQL LCASE() Function - MYSQL LCASE function will return the input column values in lower case.

MYSQL MID() Function - MYSQL MID functin will return the substring from the input value.

MYSQL LEN() Function - MYSQL LEN function will return the string character length for the input value.

MYSQL ROUND() Function - MYSQL ROUND function is used to round of the numeric value passed as input to the number of decimals specified.

MYSQL NOW() Function - MYSQL NOW function returns the current system date and time.

MYSQL FORMAT() Function - MYSQL FORMAT function will return the foramt for the field.

MYSQL SQRT() Function - MYSQL SQRT function will return the non negative square root on the numeric input value.

MYSQL QUOTE() Function - MYSQL QUOTE function escapes the input value to pass in the mysql query.

MYSQL REGEX() Function - MYSQL REGEX function is used to match pattern using regular expressions.

This article is contributed by Ankur Rastogi on Sat Jun 04 2016 16:50:36 GMT+0530 (IST)

If you want to add more comments to the article or you see any thing incorrect please write a comment below and we will surely get back to you.