Numeric Functions of mysql on slide share

ggrakesh2255 0 views 11 slides Oct 09, 2025
Slide 1
Slide 1 of 11
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11

About This Presentation

Mysql Numerics functions


Slide Content

Numeric functions S.B. Subbu Rakesh​

What is numeric functions? SQL numeric functions are tools within the SQL language specifically designed to handle numerical data. They enable users to perform various mathematical operations and manipulations on numeric values stored in a database. These functions can be used to carry out calculations, modify data types, perform rounding, generate random numbers, and conduct other numeric operations within SQL queries. Numeric Functions 2

3 ABS(): The SQL ABS() function accepts a single numeric value as an argument and returns the corresponding absolute value for this numeric value. Example: Output: 2. PI(): SQL PI() function is a mathematics function in the SQL that return the value of (pi). Example: Output:

4 3. ROUND(): The SQL ROUND() is a mathematical function that is used to represent the floating-point number with the specified number of digits after the decimal point. Example: Output: 4. RAND(): The SQL RAND() is a function that will display the random values that lie between 0 and 1. and it does not return exactly 1. Example: Output:

5 5. SIGN(): The SQL SIGN () function is used to determine whether a number is positive, negative, or zero. Example: Output: 6. SQRT(): The SQL SQRT() function returns the square root of a positive number. This accept the non-negative number as a parameter. Example: Output: 7. POWER(): SQL POWER() is the mathematical function that returns the value of a number raised to the power of another number. Example: Output:

6 8. EXP(): The SQL EXP() function accepts a numeric value as an argument and calculates the base of the natural logarithms, e, to the power of the given value. Example: Output: 9. CEILING(): The SQL CEILING() function accepts a numeric value as an argument and returns the smallest (closest to negative infinity) integer value that is greater than or equal to this value. Example: Output: 10. FLOOR(): The SQL FLOOR() is a numeric function in SQL that returns the largest integer value which is the smaller than or equal to the given number. Example: Output:

7 11. SIN(): The SQL SIN () function is a mathematical function that retrieves the sine value of a numerical value. It accepts an integer as a parameter as well as angles such as PI()/2, PI()/3, PI()/4, and PI()/6 and returns the float expression which is the the sin value (in radians) Example: Output: 12. ASIN(): The SQL ASIN() function calculates the arc sine of a numeric value. This function accepts a single numeric value as an argument. The domain of the argument must be [-1,1] Example: Output: 13. COS(): The SQL COS() function calculates the trigonometric cosine of the given value. This function accepts a single numeric value as an argument. the range of the result will be [-1,1]. Example: Output:

8 14. ACOS(): The SQL ACOS() function calculates the arc cosine of a numeric value. This function accepts a single numeric value as an argument. The domain of the argument must be [-1,1] and the range of the result will be [0,π]. Example: Output: 15. TAN(): SQL TAN () is a mathematical function that fetches the tangent of a numerical value as well as an angles value like PI(), PI()/2, PI()/3, PI()/4, and PI()/6, and returns the float expression representing the tangent of the given number in radians. Example: Output: 16. ATAN(): The SQL ATAN() function calculates the arc tangent of a numeric value. This function accepts a single numeric value as an argument. Example: Output:

9 17. DEGREES(): The SQL DEGREES() function accepts a numeric value (representing in radians) as an argument and converts it to an approximately equivalent angle measured in degrees. Example: Output: 18. RADIANS(): The SQL RADIANS () is a function in SQL that is very useful for the conversion, which converts the degree to the radians and returns the radians value. Example: Output: 19. LOG(): The SQL LOG() function accepts a numerical value as a parameter and returns the natural logarithm of it. this function returns the base-e logarithm of the given value. You can also pass two parameter in the LOG() function like LOG(X, B). Example: Output:

10 20. GREATEST(): The SQL GREATEST () function returns the greatest value of the list of arguments. Example: Output: 21. LEAST(): The SQL LEAST () function returns the greatest value of the list of arguments. Example: Output:

THANK YOU
Tags