Multiple choice technology databases

The output of the query "select sign(abs(-88)) from dual;" is

  1. -

  2. +

  3. 0

  4. 1

  5. None of the above

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

The abs function returns absolute value, so abs(-88) = 88. The sign function returns 1 for positive numbers, -1 for negative, and 0 for zero. Therefore sign(abs(-88)) = sign(88) = 1.