In PostgreSQL, the trunc()
function truncates a number.
More specifically, it truncates the number either toward zero, or to a specific number of decimal places.
Continue readingIn PostgreSQL, the trunc()
function truncates a number.
More specifically, it truncates the number either toward zero, or to a specific number of decimal places.
Continue readingIn PostgreSQL, the ceiling()
function is used for rounding a number up to the nearest integer.
It’s similar to round()
, except that it only rounds up. The round()
function will round up or down as required.
It’s also similar to floor()
, except that floor()
rounds down instead of up.
In PostgreSQL, the floor()
function is used for rounding a number down to the nearest integer.
It’s basically the opposite of ceiling()
, which rounds a number up.
It’s also similar to round()
, except that it only rounds down. The round()
function will round up or down as required.
In PostgreSQL, the round()
function is used for rounding a number.
The function can work in one of two ways, depending on how you use it. You can make it round the number to the nearest integer, or to a specified number of decimal places.
This is determined by the number of arguments you pass to the function when you call it.
Continue readingMySQL includes a bunch of functions and operators that can help us when working with data.
The following is a list of mathematical functions available in MySQL. You can click on each function name to see an explanation of the function, its syntax, and examples.
Transact-SQL contains a number of mathematical functions that you can use with SQL Server.
The following scalar functions can be used in SQL Server 2012 and above. Most of these functions accept one or more arguments, and will return a numeric value based on the argument/s supplied.
In SQL Server, the TAN()
function returns the tangent of the input expression.
You provide the value as an argument when calling the function.
Using SQL Server, you can use the T-SQL SQUARE()
function to return the square of a specified float value. The square of a number is the result of multiplying the number by itself.
You provide the number as an argument when calling the function.
The return data type is float.
Using SQL Server, you can use the T-SQL SQRT()
function to return the square root of a specified float value.
You provide the number as an argument when calling the function.
The return data type is float.
Using SQL Server, you can use the T-SQL SIN()
function to return the sine of a number. More specifically, this function returns the trigonometric sine of the specified angle, in radians, and in an approximate numeric, float, expression.
The return data type is float.
You provide the number as an argument when calling the function.