Multiple choice technology databases

Select length(-1) from dual What is the output of the above sql stmt

  1. 2

  2. 1

  3. 0

  4. error

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

In Oracle SQL, the LENGTH function returns NULL when given a negative number input. When you execute 'SELECT length(-1) FROM dual', Oracle implicitly converts -1 to a string, but LENGTH(-1) evaluates to NULL, not the count of digits. This is specific Oracle behavior for the LENGTH function with negative numeric inputs.