Multiple choice technology databases

The primary key on table EMP is the EMPNO column. Which of the following statements will not use the associated index on EMPNO?

  1. select * from EMP where nvl(EMPNO, '00000') = '59384';

  2. select * from EMP where EMPNO = '59384';

  3. select EMPNO, LASTNAME from EMP where EMPNO = '59384';

  4. select 1 from EMP where EMPNO = '59834';

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

Applying the NVL function to the indexed column EMPNO prevents the database query optimizer from using the standard index, forcing a full table scan. In contrast, the other queries query EMPNO directly without modifying the column with a function, allowing successful index usage.