MySQL Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Mysql Tutorial
Introduction
How to Install
Database
Datatypes
Tables
INSERT
SELECT
UPDATE
DELETE
Operators
Functions
Ask Your Doubts
Feedback
 





Mysql Math functions


Tutorials Mysql

Topic

What are the Math Functions in MySQL?



Explanation


Mathematical Functions :

    Now lets see Mysql Math functions with examples.

ABS(X) :

    This function returns the Absolute value of the given value.

mysql> select abs(5);
 -->  5

mysql> select abs(-25);
 -->  25
ACOS(X) :

    Returns the arc Cosine value of the given number.
mysql> select acos(0);
 -->  1.5707963267949

mysql> select acos(1);
 -->  0
ASIN(X) :

    Returns the arc Sine value of the given number.
mysql> select asin(1);
 -->  1.5707963267949

mysql> select asin(0);
 -->  0
ATAN(X) :

    Returns the arc Tangent value of the given number.
mysql> select atan(1);
 -->  0.78539816339745

mysql> select atan(2);
 -->  1.1071487177941
CEIL(X) or CEILING(X) :

    Returns the smallest integer nearest to the given value but not less than that.
mysql> select ceil(1.14);
 -->  2

mysql> select ceiling(-1.14);
 -->  -1
COS(X) :

    Returns the Cosine of X, where X is given in radians.
mysql> select cos(pi());
 -->  -1

mysql> select cos(0);
 -->  1
COT(X) :

    Returns the cotangent value of X.
mysql> select cot(1);
 -->  0.64209261593433

mysql> select cot(45);
 -->  0.61736962378356
                Press next to learn more mysql math functions.





A Note

MySQL is the most popular open source Relational database Management system (RDBMS). Being a open source anyone can use and change the software for their needs. Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this MySQL tutorial. This is a copyright content.


Other Links

web hosting