LOG10()

函数说明

LOG10(X) 函数返回以 10 为底 X 的对数。

函数语法

  1. > LOG10(X)

参数释义

参数说明
X必要参数,任何当前支持的数值数据

示例

  1. drop table if exists t1;
  2. create table t1(a float, b float);
  3. insert into t1 values(10000,3784.159);
  4. insert into t1 values(2738,682.325);
  5. mysql> select log10(a),log10(b) from t1;
  6. +-------------------+--------------------+
  7. | log10(a) | log10(b) |
  8. +-------------------+--------------------+
  9. | 4 | 3.577969368581086 |
  10. | 3.437433443797971 | 2.8339912916439594 |
  11. +-------------------+--------------------+
  12. 2 rows in set (0.00 sec)