LOG()

Description

LOG(X) returns the natural logarithm of X.

Syntax

  1. > LOG(X)

Arguments

ArgumentsDescription
XRequired. Any numeric data type supported now.

Examples

  1. drop table if exists t1;
  2. create table t1(a float, b float);
  3. insert into t1 values(2,8);
  4. mysql> select log(a), log(b) from t1;
  5. +--------------------+--------------------+
  6. | log(a) | log(b) |
  7. +--------------------+--------------------+
  8. | 0.6931471805599453 | 2.0794415416798357 |
  9. +--------------------+--------------------+
  10. 1 row in set (0.00 sec)

Constraints

LOG(X) only support one parameter input for now.