Multiple choice technology databases

select instr('Hi Partha Sarathi Ojha','a',6,-1) from dual; The output would be..

  1. Error: Syntax error

  2. 0

  3. 5

  4. Error: Argument '-1' is out of range

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

INSTR's fourth parameter (occurrence) cannot be negative - valid values are positive integers. The function throws ORA-01428 'argument out of range' when occurrence is -1. Negative values work for the third parameter (start position) to search backwards, but not for occurrence.