Home >> MySql >> How do I get the absolute value of a column in MySql

How do I get the absolute value of a column in MySql

The ABS(n) aggregate function used for an absolute(positive) value.

Example-1

SELECT ABS(-122)

Output
122

Example-2

SELECT ABS(-144.43)

Output
144.43

Post Your Comment

Next Questions
How to find round value
How to get rounded data
How to find square root of a number
How to find the greatest value in a list
How to find the least value in a list
How To Find e raised to the power of the specified number
How to find a value extracted from a date
How to find a value extracted from a date or datetime
How to find a value extracted from an internal value

Copyright ©2022 coderraj.com. All Rights Reserved.