Multiple choice

A SQL SELECT statement containing the ROWNUM pseudocolumn, an ORDER BY clause, and a subquery was created. What construct was created?

  1. A Complex View

  2. A Top-n Query

  3. A Materialized View

  4. A Hierarchical Report

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

A Top-n query uses ROWNUM with ORDER BY in a subquery to limit results to the top n rows after sorting. The construct involves nesting a query with ORDER BY inside another that filters on ROWNUM to get the first n records. This is different from complex views, materialized views, or hierarchical reports.