TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Automation

MySQL Mathematical Functions

Overview

In this tutorial, we will learn about MySQL mathematical functions with examples. MySQL supports many in built functions. Mathematical functions are type of function that are mostly used for mathematical calculations.

MySQL Mathematical Functions

Some MySQL mathematical function are as follows:

Numeric Function
Description
EXP(X)

 

This function returns the value of e raised to the power of X.
The inverse of this function is LOG().
LN(X) This function returns the natural logarithm (the base-e logarithm) of X.
LOG(B,X) This function returns the logarithm of the base B of X.
LOG2(X) This function returns the base-2 logarithm of X.
LOG10(X)  This function returns the base-10 logarithm of X.
POWER(X,Y) or POW This function returns the value of X raised to the power of Y.
SQRT(X) This function returns the square root of X.
MOD(N,M) This function returns the remainder of N divided by M.(the Modulo operation. )

 

Examples

mysql> SELECT EXP(1);
+——————-+
| EXP(1) |
+——————-+
| 2.718281828459045 |
+——————-+
1 row in set (0.00 sec)

mysql> SELECT LOG10(100);
+————+
| LOG10(100) |
+————+
| 2 |
+————+
1 row in set (0.01 sec)

MySQL Mathematical Functions Examples

—

MySQL Tutorials

MySQL Tutorials on this website:

https://www.testingdocs.com/mysql-tutorials-for-beginners/

For more information on MySQL Database:

https://www.mysql.com/

Related Posts

Emma Tool

Automation /

Code Coverage Tools

Selenium 4 Automation Project

Automation /

Selenium 4 Project Setup on Ubuntu Linux

Testing webpage mobile-friendliness using a tool

Automation /

Testing webpage mobile-friendliness using a tool

Errors Code Testing Development

Automation /

Error Severity Metrics

Automation Environment Setup Verification

Automation /

Automation Environment Setup Verification

‹ Types of Software Test Plans› Create Excel sheets with JXL API Code Example

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com