Flow Control

MySQL flow control functions can be used to query given columns and return results for a field based on the results of the column query.
IF( )
This MySQL function returns the result given in the second argument if the condition given in the first argument is met (i.e., the condition does not equal 0 or NULL). If the condition does equal 0 or NULL, the function returns the result given in the third argument.
ISNULL( )
Use this MySQL function to determine whether the value of the argument given in parentheses is NULL. It returns 1 if the value is NULL and 0 if it is not NULL.
CASE
This MySQL function produces results that vary based on which condition is true. It is similar to the IF( ) function except that multiple conditions and results may be strung together.
NULLIF( )
This MySQL function returns NULL if the two arguments given are equal. Otherwise, it returns the value or results of the first argument.
IFNULL( )
This MySQL function returns the results of the condition given in the first argument of the function if its results are not NULL. If the condition results are NULL, the results of the expression or string given in the second argument are returned.

Need Math Examples

Although we did well in math classes all through school, we have very little experience with the Math Functions of MySQL very little. As a result, we don't have very good examples for them. If you work in science or engineering and have some ideas for easy to understand examples that we can add, please tell us.

MySQL Replication

Whether you’re new to MySQL replication or have been using it for some time, you will find this new book useful. It will help you actually to understand MySQL replication so you can keep it running. It’s especially useful when replication stops and you can’t get it started again.