Updated on 2026-11-06 GMT+08:00

cbrt

The cbrt function is used to return the cube root of a.

Syntax

cbrt(DOUBLE a) 

Parameters

Parameter

Mandatory

Type

Description

a

Yes

DOUBLE, BIGINT, DECIMAL, or STRING

The format of parameter a includes floating-point format, integer format, and string format. If parameter a is not of type DOUBLE, it is implicitly converted to DOUBLE type before evaluation.

Return Values

Returns a value of type DOUBLE.

If a is NULL, NULL is returned.

Example Code

Returns 3.

select cbrt(27); 

Returns 3.3019272488946267.

select cbrt(36); 

Returns NULL.

select cbrt(null);