Function...
- MySQL function is a piece of program to perform some specific task.
- MySQL function mainly supports string, numeric, conditional, and date functions. MySQL main function shows below.
1.control flow function : This function controls the table data.
2.aggregation function : This function works on the numerical table data.
3.comparison function : This function compares the table data.
4.date function : This function works on the date of the table data.
5.string function : This function works on the string table data.
6.Math function : This function works on the numerical table data.
1.MySQL control flow function
The control flow function uses values or operands for logical conditions. This function control application's data using the below statement.
IF : The IF statement shows the true result of the control flow function.
IFNULL : The IFNULL statement shows null or not null of the data.
NULLIF : The NULLIF statement works on the not null value of the data.
CASE : This statement works on multiple conditions.
2.MySQL Aggregate function
- The aggregation function works on multiple values and returns the output in a single value.
- The advanced and complex operation becomes simple using the aggregation function.
- The summation (SUM), MAX, AVG, MIN, COUNT functions come under the aggregate function.
SUM : This function works for the addition of the table values.
MAX :This function determines the maximum value of the data set.
AVG :This function determines the average value of the data set.
MIN :This function determines the minimum value of the data set.
COUNT :This function returns the total count of the data set.