This topic describes how to use the mathematical function LOG10 in Realtime Compute.

Syntax

DOUBLE LOG10(DOUBLE x)   

Input parameters

Parameter Data type
x DOUBLE

Description

Returns a decimal logarithm. If x is null, the return value is null. If x is negative, an error occurs.

Example

  • Test data
    id (INT) X (INT)
    1 100
    2 10
  • Test statements
    SELECT id, log10(x) as dou1
    FROM T1;         
  • Test results
    id (INT) dou1 (DOUBLE)
    1 2.0
    2 1.0