Multiple choice technology databases

What is the ABS SQL function used for?

  1. To return the minimum value of a numeric expression.

  2. To return the absolute, positive value of a numeric expression.

  3. To return the maximum value of a numeric expression.

  4. To return the average value of a numeric expression.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The ABS function returns the absolute (positive) value of a number, converting negative values to positive while leaving positive values unchanged. For example, ABS(-5) returns 5, and ABS(3) returns 3. It's useful for distance calculations or magnitude comparisons.