問題文
A report has to show the five highest paid employees. The writer adds FETCH FIRST 5 ROWS ONLY to a query that has no ORDER BY clause. What does that query return?
選択肢
- The five highest paid rows, because the limiting clause sorts the rows by the first numeric column in the list before it counts the rows to return.
- Five rows chosen by whichever access path the database used, because the limiting clause counts rows after the sort and there is no sort to count against.
- The whole result set, because the limiting clause takes effect only when an OFFSET is written in front of the row count in the same clause.
- An error at parse time, because the limiting clause requires an ORDER BY clause in the same query block whenever a row count is given.