PostgreSQL CBRT Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL CBRT() function

CBRT() function

The PostgreSQL cbrt() function is used to return the cube root of a given number.

Syntax :

cbrt()

PostgreSQL Version : 9.3

Pictorial presentation of PostgreSQL CBRT() function

 

Example : PostgreSQL CBRT() function

SELECT CBRT(343) AS "Cube Root";

Output :

 Cube Root
-----------
         7
(1 row)

Example : PostgreSQL CBRT() function using negative value

SELECT CBRT(-343) AS "Cube Root";

Output :

 Cube Root
-----------
        -7
(1 row)