Multiple choice technology databases

How many rows records the following query will display.. select * from TEMP where rownum between 0 and 3 ? N.R. Temp table has 30 records

  1. 1 row

  2. NULL

  3. 30 rows

  4. 3 rows

  5. 2 rows

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

ROWNUM is a pseudo-column assigned to rows as they are retrieved. In Oracle, ROWNUM values start from 1, and ROWNUM <= 3 will return the first 3 rows. The BETWEEN 0 AND 3 condition effectively filters for ROWNUM <= 3, returning exactly 3 rows from the 30-row table.