Multiple choice technology databases

Output of the query if emp table is having 100 rows: select rownum from emp group by rownum having rownum = 69;

  1. Error

  2. 69

  3. 1

  4. None

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

In Oracle, when you GROUP BY ROWNUM, it groups by the rownum values. With 100 rows, you get rownum values 1 through 100. The HAVING clause filters to show only the group where rownum equals 69, so it returns a single row with value 69. ROWNUM is a pseudocolumn assigned as rows are retrieved.