Numeric functions


show more Numeric functions provides you with in-depth training on Developer. Taught by Bill Weinman as part of the MySQL Essential Training show less
please wait ...

Numeric functions

MySQL provides a very complete set of numeric and arithmetic functions and operators. Here's are a few of the most common. For this lesson we'll be using the world database. We're just going to start with some arithmetic operators. So, if I say SELECT 7 plus 3. Then I'll get a result of 10. And if I SELECT 7 minus 3, I get 4. So these are just as you would expect, here's 7 times 3, and 7 divided by 3.

You notice that seven divided by three gets you a floating point number even though both of the operands are integers. If you want integer division, you use the DIV keyword as an operator and you get. A 2 and there is of course a reminder and you can use MOD for the reminder which stands for modulus or you can use a modulus symbol the percent sign, for the reminder and you get exactly the same result. There is no power operator so the.

Carrot does not do what you expect. So that is not 7 cubed. Rather, there's a function for power. And so you type POWER and put the operands in parenth...

Numeric functions
Video duration: 6m 2s 4h 24m Beginner

Viewers:

Numeric functions provides you with in-depth training on Developer. Taught by Bill Weinman as part of the MySQL Essential Training

Subject:
Developer
Software:
MySQL
Author:
please wait ...