フリー問題

Oracle Database SQL のフリー問題 6 / 20 問目

問題文

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?

選択肢

  1. 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.
  2. 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.
  3. 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.
  4. 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.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。