C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL ABS() FunctionThe abs() is a Math function of MySQL. This function is used to get the absolute value of the given number. Syntax
select abs(num); Parameters:
num: It is the number to get absolute value. ReturnsThis function returns the absolute value of a number. Example 1
Select abs(11); Output:
Example 2Select abs(11.2); Output:
Example 3Select abs(-11.2); Output:
Example 4Select abs(-11*2); Output:
Example 5Select abs(11*-2); Output:
Next TopicMySQL Math
|