Multiple choice technology databases

Which two statements are true regarding the ORDER BY clause?

  1. The sort is in ascending by order by default.

  2. The sort is in descending order by default.

  3. The ORDER BY clause must precede the WHERE clause.

  4. The ORDER BY clause is executed on the client side.

  5. The ORDER BY clause comes last in the SELECT statement

  6. The ORDER BY clause is executed first in the query execution.

Reveal answer Fill a bubble to check yourself
A,E Correct answer
Explanation

Option A is correct - ORDER BY defaults to ascending order unless DESC is explicitly specified. Option E is correct - ORDER BY is typically the last clause in a SELECT statement (after FROM, WHERE, GROUP BY, HAVING). Option B is false (ascending is default). Option C is false - WHERE comes before ORDER BY. Option D is false - ORDER BY executes on the server, not client. Option F is false - ORDER BY is one of the last operations in query execution.