Mathematical functions are present in SQL server which can be used to perform mathematical calculations. Some commonly used mathematical functions are given below:
SQRT() function is the most commonly used function. It takes any numeric values and returns the square root value of that number.
2. PI(): There are calculations which require use of pi. Using pi() function, value of PI can be used anywhere in the query.
3. SQUARE(): SQUARE() function is used to find the square of any number.
4. ROUND(): ROUND() function is used to round a value to the nearest specified decimal place.
SELECT ROUND(..value.., number_of_decimal_places)
5. CEILING() and FLOOR()
CEILING(): CEILING() function is used to find the next highest value (integer).
FLOOR(): FLOOR() function returns the next lowest value (integer).
- Mathematical functions in MySQL
- SQL | Functions (Aggregate and Scalar Functions)
- SQL | Difference between functions and stored procedures in PL/SQL
- Difference between Structured Query Language (SQL) and Transact-SQL (T-SQL)
- Delete statement in MS SQL Server
- SQL Server Identity
- SQL SERVER | Conditional Statements
- SQL Server | STUFF() Function
- SQL Server | SERVERPROPERTY()
- Mean and Mode in SQL Server
- Allow only alphabets in column in SQL Server
- SQL SERVER | IN Condition
- Difference between MySQL and MS SQL Server
- Comparisons between Oracle vs SQL Server
- Introduction of MS SQL Server
- Select statement in MS SQL Server
- Order by in MS SQL Server
- Distinct clause in MS SQL Server
- Where clause in MS SQL Server
- Create, Alter and Drop schema in MS SQL Server
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.