Informatics Practices

Assertion. The ORDER BY clause of SELECT statement is carried out in the last after executing other clauses of the SELECT statement.

Reason. The ORDER BY clause is carried out on the final result of the SELECT query.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

SQL Queries

1 Like

Answer

Both A and R are true and R is the correct explanation of A.

Explanation
In SQL, the execution order of a SELECT statement is such that the ORDER BY clause is processed last, after all other clauses like FROM, WHERE, GROUP BY, HAVING, and SELECT have been executed. This is because the ORDER BY clause sorts the final result set produced by these earlier steps.

Answered By

3 Likes


Related Questions