Multiple choice technology databases

How many rows records the following query will display.. select * from TEMP where rownum in (1,3,3,2) N.R. Temp table has 30 records

  1. NULL

  2. 1 row

  3. 3 rows

  4. 4 rows

  5. 0 row

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

ROWNUM IN (1,3,3,2) behaves similarly to ROWNUM IN (1,2,3) after deduplication. The first row gets ROWNUM=1 (matches), second row gets ROWNUM=2 (matches), third row gets ROWNUM=3 (matches). Rows 4-30 get ROWNUM values >3 and don't match. Thus, 3 rows are returned.