Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs

MySQL LOG10 Function

by suresh

MySQL LOG10 function is one of the MySQL Mathematical Function, which is useful to return the base 10 logarithmic value of a given number. Let us see how to find base 10 logarithmic values in MySQL using Command Prompt and Workbench with examples. The basic syntax of the LOG10 in MySQL is as shown below:

SELECT LOG10(x) FROM Source

LOG10 Function Example 1

The LOG10 function returns the base 10 logarithmic value of any numeric value. The following query shows you multiple ways to use the LOG10 function.

SELECT LOG10(100);

SELECT LOG10(1230);

SELECT LOG10(78930), LOG10(-20);
MySQL LOG10 Function 1

MySQL LOG10 Example 2

The MySQL LOG10 Function also allows you to find and return the base 10 logarithmic value of a column data. In this Mathematical Function example, we are going to find the base 10 logarithmic values for all the MySQL records present in Sales Amount, Standard Cost, and Tax Amount columns.

SELECT EnglishProductName, 
Color,
      StandardCost,
      LOG10( StandardCost) AS Log10StdCost,
      SalesAmount,
      LOG10( SalesAmount) AS Log10SalesAmount,
      TaxAmt,
     LOG10( TaxAmt) AS Log10TaxAmt
 FROM `MySQL Tutorial`.`mathemetical functions`;
MySQL LOG10 Function 2

Placed Under: MySQL

  • How to Download MySQL
  • Install MySQL on Windows
  • MySQL Create Database
  • MySQL Delete Database
  • MySQL Create Table
  • MySQL Drop Table
  • MySQL SELECT Statement
  • MySQL ALIAS Column
  • MySQL Distinct
  • MySQL Insert Statement
  • MySQL Delete
  • MySQL Truncate Table
  • MySQL WHERE Clause
  • MySQL Order By
  • MySQL Group By
  • MySQL Having Clause
  • MySQL LIMIT
  • MySQL Arithmetic Operators
  • MySQL COALESCE Function
  • MySQL AND Operator
  • MySQL NOT Operator
  • MySQL OR Operator
  • MySQL XOR Operator
  • MySQL BETWEEN Operator
  • MySQL Not Between Operator
  • MySQL GREATEST Function
  • MYSQL LEAST Function
  • MySQL LIKE Operator
  • MySQL NOT LIKE Operator
  • MySQL IFNULL Operator
  • MySQL NULLIF Operator
  • MySQL INTERVAL Operator
  • MySQL IS Operator
  • MySQL IN Operator
  • MySQL NOT IN Operator
  • MySQL IS NOT NULL
  • MySQL IS NULL
  • MySQL Inner Join
  • MySQL Cross Join
  • MySQL Right Join
  • MySQL Left Join
  • MySQL Aggregate Functions
  • MySQL Date Functions
  • MySQL Date Function
  • MySQL String Functions
  • MySQL Numeric Functions

Copyright © 2021 · All Rights Reserved by Suresh

About Us | Contact Us | Privacy Policy