totn MariaDB Functions

MariaDB: POW Function

This MariaDB tutorial explains how to use the MariaDB POW function with syntax and examples.

Description

The MariaDB POW function returns m raised to the nth power.

Syntax

The syntax for the POW function in MariaDB is:

POW( m, n )

Parameters or Arguments

m
Numeric value. It is the base used in the calculation.
n
Numeric value. It is the exponent used in the calculation.

Note

Applies To

The POW function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB POW function examples and explore how to use the POW function in MariaDB.

For example:

SELECT POW(7, 2);
Result: 49

SELECT POW(7, -2);
Result: 0.02040816326530612

SELECT POW(2.5, 6);
Result: 244.140625

SELECT POW(0, 5);
Result: 0

SELECT POW(5, 0);
Result: 1