MOD POWER SQRT functions in SQL

For Complete YouTube Video: Click Here

In this class, we will understand MOD POWER SQRT functions in SQL.

We have already understood the concepts of ABS CEIL and FLOOR.

MOD POWER SQRT functions in SQL

The other kinds of mathematical functions that are possible are MOD POWER SQRT functions in SQL.

To understand these functions consider the table as shown below.

MOD POWER SQRT functions in SQL 1
MOD POWER SQRT functions in SQL 1

MOD

MOD is used for Modulus division to produces the remainder of the division.

The syntax for MOD as shown below.

MOD(Value, Divisor)

The use of MOD and its output is as shown below.

MOD POWER SQRT functions in SQL 2
MOD POWER SQRT functions 2

POWER

POWER is used to value to the given positive exponent.

The syntax for POWER as shown below.

POWER(Value, Exponent)

The use of POWER and its output is as shown below.

MOD POWER SQRT functions in SQL 3
MOD POWER SQRT functions 3

SQRT

SQRT is used to find the Square Root of given number.

The syntax for SQRT as shown below.

SQRT(value)

The SQRT should not be used with negative numbers.

If we use SQRT with negative number the SQL will produce an error as shown below.

MOD POWER SQRT functions in SQL 4
MOD POWER SQRT functions 4

To avoid that error we can use the ABS function with in the SQRT function as shown below.

MOD POWER SQRT functions in SQL 5
MOD POWER SQRT functions 5