Class - 12 CBSE Computer Science — Assertion Reason Type Questions
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.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- 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
1 Like