Multiple choice technology databases

select substr('DECCANPARK',3,-1) FROM DUAL would results in?

  1. ARK

  2. CED

  3. DEC

  4. NULL

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

Oracle's SUBSTR with a negative length parameter returns NULL, not a substring. Starting at position 3 would give 'CCANPARK', but the negative length makes the function return NULL instead.