Skip to content

ABS

  • x: The numeric expression or field from which the absolute value will be calculated.
SELECT ABS(-243);
243

In the above example, the built-in MySQL ABS() function is used to return the absolute value of a number. The ABS() function takes a single argument, in this case -243, and returns its absolute value, which is 243.